home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Technical Documentation / Mac Tech Notes (DocViewer) / QuickDraw / TN-QuickDraw < prev   
MacBinary  |  1994-07-24  |  1.7 MB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Thu Jul 15 17:02:11 1993, modified Sun Jul 24 15:00:16 1994, creator 'HLX2', type 'ONLN', 1707055 bytes "TN-QuickDraw" , at 0x1a0caf 43157 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 54 4e 2d 51 75 69 | 63 6b 44 72 61 77 00 00 |..TN-Qui|ckDraw..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 1a 0c 2f 00 | 00 a8 95 a8 6b 76 53 aa |....../.|....kvS.|
|00000060| 58 6a c0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |Xj......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 d9 02 00 00 |........|........|
|00000080| 51 44 20 31 20 2d 20 33 | 32 2d 42 69 74 20 51 75 |QD 1 - 3|2-Bit Qu|
|00000090| 69 63 6b 44 72 61 77 3a | 20 20 56 65 72 73 69 6f |ickDraw:| Versio|
|000000a0| 6e 20 31 2e 32 20 46 65 | 61 74 75 72 65 73 0d 51 |n 1.2 Fe|atures.Q|
|000000b0| 75 69 63 6b 44 72 61 77 | 09 0d 57 72 69 74 74 65 |uickDraw|..Writte|
|000000c0| 6e 20 62 79 3a 09 47 75 | 69 6c 6c 65 72 6d 6f 20 |n by:.Gu|illermo |
|000000d0| 4f 72 74 69 7a 09 41 70 | 72 69 6c 20 31 39 39 30 |Ortiz.Ap|ril 1990|
|000000e0| 0d 54 68 69 73 20 54 65 | 63 68 6e 69 63 61 6c 20 |.This Te|chnical |
|000000f0| 4e 6f 74 65 20 64 65 73 | 63 72 69 62 65 73 20 74 |Note des|cribes t|
|00000100| 68 65 20 63 68 61 6e 67 | 65 73 20 61 6e 64 20 65 |he chang|es and e|
|00000110| 6e 68 61 6e 63 65 6d 65 | 6e 74 73 20 74 6f 20 33 |nhanceme|nts to 3|
|00000120| 32 2d 42 69 74 20 51 75 | 69 63 6b 44 72 61 77 20 |2-Bit Qu|ickDraw |
|00000130| 66 72 6f 6d 20 76 65 72 | 73 69 6f 6e 20 31 2e 30 |from ver|sion 1.0|
|00000140| 20 28 61 73 20 73 68 69 | 70 70 65 64 20 6f 6e 20 | (as shi|pped on |
|00000150| 74 68 65 20 6f 72 69 67 | 69 6e 61 6c 20 43 6f 6c |the orig|inal Col|
|00000160| 6f 72 20 44 69 73 6b 29 | 20 74 6f 20 76 65 72 73 |or Disk)| to vers|
|00000170| 69 6f 6e 20 31 2e 32 2c | 20 77 68 69 63 68 20 73 |ion 1.2,| which s|
|00000180| 68 69 70 73 20 77 69 74 | 68 20 53 79 73 74 65 6d |hips wit|h System|
|00000190| 20 53 6f 66 74 77 61 72 | 65 20 36 2e 30 2e 35 20 | Softwar|e 6.0.5 |
|000001a0| 61 6e 64 20 6c 61 74 65 | 72 2e 20 20 54 68 69 73 |and late|r. This|
|000001b0| 20 4e 6f 74 65 20 61 73 | 73 75 6d 65 73 20 66 61 | Note as|sumes fa|
|000001c0| 6d 69 6c 69 61 72 69 74 | 79 20 77 69 74 68 20 49 |miliarit|y with I|
|000001d0| 6e 73 69 64 65 20 4d 61 | 63 69 6e 74 6f 73 68 2c |nside Ma|cintosh,|
|000001e0| 20 56 6f 6c 75 6d 65 20 | 56 2c 20 43 6f 6c 6f 72 | Volume |V, Color|
|000001f0| 20 51 75 69 63 6b 44 72 | 61 77 2c 20 61 6e 64 20 | QuickDr|aw, and |
|00000200| 33 32 2d 42 69 74 20 51 | 75 69 63 6b 44 72 61 77 |32-Bit Q|uickDraw|
|00000210| 20 72 65 6c 65 61 73 65 | 20 6e 6f 74 65 73 2e 0d | release| notes..|
|00000220| 33 32 2d 42 69 74 20 51 | 75 69 63 6b 44 72 61 77 |32-Bit Q|uickDraw|
|00000230| 0d 56 65 72 73 69 6f 6e | 20 31 2e 30 20 6f 66 20 |.Version| 1.0 of |
|00000240| 33 32 2d 42 69 74 20 51 | 75 69 63 6b 44 72 61 77 |32-Bit Q|uickDraw|
|00000250| 20 73 68 69 70 70 65 64 | 20 69 6e 20 4d 61 79 20 | shipped| in May |
|00000260| 31 39 38 39 20 69 6e 20 | 72 65 73 70 6f 6e 73 65 |1989 in |response|
|00000270| 20 74 6f 20 74 68 65 20 | 67 72 6f 77 69 6e 67 20 | to the |growing |
|00000280| 6e 65 65 64 20 66 6f 72 | 20 43 6f 6c 6f 72 20 51 |need for| Color Q|
|00000290| 75 69 63 6b 44 72 61 77 | 20 73 75 70 70 6f 72 74 |uickDraw| support|
|000002a0| 20 66 6f 72 20 64 69 72 | 65 63 74 20 63 6f 6c 6f | for dir|ect colo|
|000002b0| 72 20 64 65 76 69 63 65 | 73 20 61 6e 64 20 70 69 |r device|s and pi|
|000002c0| 63 74 75 72 65 73 20 28 | 50 49 43 54 32 29 20 61 |ctures (|PICT2) a|
|000002d0| 6e 64 20 76 69 64 65 6f | 20 62 6f 61 72 64 73 20 |nd video| boards |
|000002e0| 66 6f 72 20 6c 61 72 67 | 65 2d 73 63 72 65 65 6e |for larg|e-screen|
|000002f0| 20 6d 6f 6e 69 74 6f 72 | 73 20 77 68 69 63 68 20 | monitor|s which |
|00000300| 72 65 71 75 69 72 65 20 | 33 32 2d 62 69 74 20 61 |require |32-bit a|
|00000310| 64 64 72 65 73 73 69 6e | 67 20 66 6f 72 20 62 6c |ddressin|g for bl|
|00000320| 61 63 6b 20 61 6e 64 20 | 77 68 69 74 65 20 6f 70 |ack and |white op|
|00000330| 65 72 61 74 69 6f 6e 2e | 20 20 54 68 69 73 20 6f |eration.| This o|
|00000340| 72 69 67 69 6e 61 6c 20 | 76 65 72 73 69 6f 6e 20 |riginal |version |
|00000350| 6f 66 20 33 32 2d 42 69 | 74 20 51 75 69 63 6b 44 |of 32-Bi|t QuickD|
|00000360| 72 61 77 20 77 61 73 20 | 61 20 73 65 70 61 72 61 |raw was |a separa|
|00000370| 74 65 20 66 69 6c 65 20 | 74 68 61 74 20 68 61 64 |te file |that had|
|00000380| 20 74 6f 20 62 65 20 63 | 6f 70 69 65 64 20 6d 61 | to be c|opied ma|
|00000390| 6e 75 61 6c 6c 79 20 69 | 6e 74 6f 20 74 68 65 20 |nually i|nto the |
|000003a0| 53 79 73 74 65 6d 20 46 | 6f 6c 64 65 72 2e 20 20 |System F|older. |
|000003b0| 57 69 74 68 20 74 68 65 | 20 69 6e 74 72 6f 64 75 |With the| introdu|
|000003c0| 63 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 4d 61 63 |ction of| the Mac|
|000003d0| 69 6e 74 6f 73 68 20 49 | 49 63 69 2c 20 41 70 70 |intosh I|Ici, App|
|000003e0| 6c 65 20 70 75 74 20 33 | 32 2d 42 69 74 20 51 75 |le put 3|2-Bit Qu|
|000003f0| 69 63 6b 44 72 61 77 20 | 69 6e 74 6f 20 52 4f 4d |ickDraw |into ROM|
|00000400| 2e 20 20 4e 6f 77 20 53 | 79 73 74 65 6d 20 53 6f |. Now S|ystem So|
|00000410| 66 74 77 61 72 65 20 36 | 2e 30 2e 35 20 61 6e 64 |ftware 6|.0.5 and|
|00000420| 20 6c 61 74 65 72 20 6f | 66 66 65 72 20 33 32 2d | later o|ffer 32-|
|00000430| 42 69 74 20 51 75 69 63 | 6b 44 72 61 77 20 61 73 |Bit Quic|kDraw as|
|00000440| 20 61 6e 20 69 6e 74 65 | 67 72 61 6c 20 70 61 72 | an inte|gral par|
|00000450| 74 20 6f 66 20 74 68 65 | 20 53 79 73 74 65 6d 20 |t of the| System |
|00000460| 53 6f 66 74 77 61 72 65 | 20 77 68 69 63 68 20 63 |Software| which c|
|00000470| 61 6e 20 62 65 20 69 6e | 73 74 61 6c 6c 65 64 20 |an be in|stalled |
|00000480| 62 79 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |by the s|tandard |
|00000490| 49 6e 73 74 61 6c 6c 65 | 72 20 28 61 6c 74 68 6f |Installe|r (altho|
|000004a0| 75 67 68 20 74 68 65 20 | 66 69 6c 65 20 69 73 20 |ugh the |file is |
|000004b0| 73 74 69 6c 6c 20 73 65 | 70 61 72 61 74 65 29 2e |still se|parate).|
|000004c0| 0d 54 68 69 73 20 4e 6f | 74 65 20 64 65 73 63 72 |.This No|te descr|
|000004d0| 69 62 65 73 20 74 68 65 | 20 63 68 61 6e 67 65 73 |ibes the| changes|
|000004e0| 20 61 6e 64 20 65 6e 68 | 61 6e 63 65 6d 65 6e 74 | and enh|ancement|
|000004f0| 73 20 69 6e 20 76 65 72 | 73 69 6f 6e 20 31 2e 32 |s in ver|sion 1.2|
|00000500| 20 6f 66 20 33 32 2d 42 | 69 74 20 51 75 69 63 6b | of 32-B|it Quick|
|00000510| 44 72 61 77 20 66 72 6f | 6d 20 76 65 72 73 69 6f |Draw fro|m versio|
|00000520| 6e 20 31 2e 30 2e 20 20 | 42 65 67 69 6e 6e 69 6e |n 1.0. |Beginnin|
|00000530| 67 20 77 69 74 68 20 76 | 65 72 73 69 6f 6e 20 31 |g with v|ersion 1|
|00000540| 2e 32 2c 20 51 75 69 63 | 6b 44 72 61 77 20 66 75 |.2, Quic|kDraw fu|
|00000550| 6e 63 74 69 6f 6e 61 6c | 69 74 79 20 69 73 20 69 |nctional|ity is i|
|00000560| 64 65 6e 74 69 63 61 6c | 20 6f 6e 20 61 6c 6c 20 |dentical| on all |
|00000570| 43 6f 6c 6f 72 20 51 75 | 69 63 6b 44 72 61 77 20 |Color Qu|ickDraw |
|00000580| 6d 61 63 68 69 6e 65 73 | 2c 20 69 6e 63 6c 75 64 |machines|, includ|
|00000590| 69 6e 67 20 61 6c 6c 20 | 74 68 65 20 70 65 72 66 |ing all |the perf|
|000005a0| 6f 72 6d 61 6e 63 65 20 | 69 6d 70 72 6f 76 65 6d |ormance |improvem|
|000005b0| 65 6e 74 73 20 77 68 69 | 63 68 20 77 65 72 65 20 |ents whi|ch were |
|000005c0| 6f 72 69 67 69 6e 61 6c | 6c 79 20 6f 6e 6c 79 20 |original|ly only |
|000005d0| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 20 74 68 65 |availabl|e in the|
|000005e0| 20 49 49 63 69 20 52 4f | 4d 2e 0d 4e 65 77 20 46 | IIci RO|M..New F|
|000005f0| 65 61 74 75 72 65 73 20 | 28 49 6e 20 4e 6f 20 50 |eatures |(In No P|
|00000600| 61 72 74 69 63 75 6c 61 | 72 20 4f 72 64 65 72 29 |articula|r Order)|
|00000610| 0d 50 49 43 54 73 20 43 | 6f 6e 74 61 69 6e 20 46 |.PICTs C|ontain F|
|00000620| 6f 6e 74 20 4e 61 6d 65 | 20 49 6e 66 6f 72 6d 61 |ont Name| Informa|
|00000630| 74 69 6f 6e 0d 45 76 65 | 72 79 20 74 69 6d 65 20 |tion.Eve|ry time |
|00000640| 79 6f 75 20 64 72 61 77 | 20 74 65 78 74 20 69 6e |you draw| text in|
|00000650| 73 69 64 65 20 6f 66 20 | 61 6e 20 5f 4f 70 65 6e |side of |an _Open|
|00000660| 50 69 63 74 75 72 65 20 | 61 6e 64 20 5f 43 6c 6f |Picture |and _Clo|
|00000670| 73 65 50 69 63 74 75 72 | 65 20 70 61 69 72 2c 20 |sePictur|e pair, |
|00000680| 51 75 69 63 6b 44 72 61 | 77 20 73 74 6f 72 65 73 |QuickDra|w stores|
|00000690| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 74 68 65 | the nam|e of the|
|000006a0| 20 63 75 72 72 65 6e 74 | 20 66 6f 6e 74 20 61 6e | current| font an|
|000006b0| 64 20 75 73 65 73 20 69 | 74 20 77 68 65 6e 20 70 |d uses i|t when p|
|000006c0| 6c 61 79 69 6e 67 20 62 | 61 63 6b 20 74 68 65 20 |laying b|ack the |
|000006d0| 70 69 63 74 75 72 65 2e | 20 20 54 68 65 20 6f 70 |picture.| The op|
|000006e0| 63 6f 64 65 20 75 73 65 | 64 20 74 6f 20 73 61 76 |code use|d to sav|
|000006f0| 65 20 74 68 69 73 20 69 | 6e 66 6f 72 6d 61 74 69 |e this i|nformati|
|00000700| 6f 6e 20 69 73 20 24 30 | 30 32 43 20 61 6e 64 20 |on is $0|02C and |
|00000710| 69 74 73 20 64 61 74 61 | 20 69 73 20 61 73 20 66 |its data| is as f|
|00000720| 6f 6c 6c 6f 77 73 3a 0d | 20 20 20 20 50 69 63 74 |ollows:.| Pict|
|00000730| 46 6f 6e 74 49 6e 66 6f | 20 3d 20 52 65 63 6f 72 |FontInfo| = Recor|
|00000740| 64 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d. | |
|00000750| 20 20 20 20 20 20 20 6c | 65 6e 67 74 68 20 20 20 | l|ength |
|00000760| 3a 20 49 6e 74 65 67 65 | 72 3b 20 20 20 20 7b 20 |: Intege|r; { |
|00000770| 6c 65 6e 67 74 68 20 6f | 66 20 64 61 74 61 20 69 |length o|f data i|
|00000780| 6e 20 62 79 74 65 73 20 | 7d 0d 20 20 20 20 20 20 |n bytes |}. |
|00000790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | | f|
|000007a0| 6f 6e 74 49 44 20 20 20 | 3a 20 49 6e 74 65 67 65 |ontID |: Intege|
|000007b0| 72 3b 20 20 20 20 7b 20 | 49 44 20 69 6e 20 74 68 |r; { |ID in th|
|000007c0| 65 20 73 6f 75 72 63 65 | 20 73 79 73 74 65 6d 20 |e source| system |
|000007d0| 7d 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|000007e0| 20 20 20 20 20 20 20 66 | 6f 6e 74 4e 61 6d 65 20 | f|ontName |
|000007f0| 3a 20 53 74 72 32 35 35 | 3b 0d 20 20 20 20 20 20 |: Str255|;. |
|00000800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 45 4e 44 | | END|
|00000810| 3b 0d 51 75 69 63 6b 44 | 72 61 77 20 6f 6e 6c 79 |;.QuickD|raw only|
|00000820| 20 73 61 76 65 73 20 74 | 68 69 73 20 69 6e 66 6f | saves t|his info|
|00000830| 72 6d 61 74 69 6f 6e 20 | 6f 6e 65 20 74 69 6d 65 |rmation |one time|
|00000840| 20 66 6f 72 20 65 61 63 | 68 20 66 6f 6e 74 20 75 | for eac|h font u|
|00000850| 73 65 64 20 69 6e 20 61 | 20 70 69 63 74 75 72 65 |sed in a| picture|
|00000860| 2e 20 20 57 68 65 6e 20 | 51 75 69 63 6b 44 72 61 |. When |QuickDra|
|00000870| 77 20 70 6c 61 79 73 20 | 62 61 63 6b 20 61 20 70 |w plays |back a p|
|00000880| 69 63 74 75 72 65 2c 20 | 69 74 20 75 73 65 73 20 |icture, |it uses |
|00000890| 74 68 65 20 66 6f 6e 74 | 49 44 20 61 73 20 61 20 |the font|ID as a |
|000008a0| 72 65 66 65 72 65 6e 63 | 65 20 69 6e 74 6f 20 74 |referenc|e into t|
|000008b0| 68 65 20 6c 69 73 74 20 | 6f 66 20 66 6f 6e 74 20 |he list |of font |
|000008c0| 6e 61 6d 65 73 20 77 68 | 69 63 68 20 61 72 65 20 |names wh|ich are |
|000008d0| 75 73 65 64 20 74 6f 20 | 73 65 74 20 74 68 65 20 |used to |set the |
|000008e0| 63 6f 72 72 65 63 74 20 | 66 6f 6e 74 20 6f 6e 20 |correct |font on |
|000008f0| 74 68 65 20 74 61 72 67 | 65 74 20 73 79 73 74 65 |the targ|et syste|
|00000900| 6d 2e 0d 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |m..For e|xample, |
|00000910| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|00000920| 64 65 3a 0d 20 20 20 20 | 47 65 74 46 4e 75 6d 28 |de:. |GetFNum(|
|00000930| 27 56 65 6e 69 63 65 27 | 2c 20 74 68 65 46 6f 6e |'Venice'|, theFon|
|00000940| 74 49 44 29 3b 20 20 20 | 20 7b 20 53 65 74 20 61 |tID); | { Set a|
|00000950| 20 66 6f 6e 74 20 62 65 | 66 6f 72 65 20 6f 70 65 | font be|fore ope|
|00000960| 6e 69 6e 67 20 50 49 43 | 54 7d 0d 20 20 20 20 54 |ning PIC|T}. T|
|00000970| 65 78 74 46 6f 6e 74 28 | 74 68 65 46 6f 6e 74 49 |extFont(|theFontI|
|00000980| 44 29 3b 0d 20 20 20 20 | 70 48 61 6e 64 32 20 3a |D);. |pHand2 :|
|00000990| 3d 20 4f 70 65 6e 50 69 | 63 74 75 72 65 20 28 70 |= OpenPi|cture (p|
|000009a0| 69 63 74 52 65 63 74 29 | 3b 0d 20 20 20 20 20 20 |ictRect)|;. |
|000009b0| 20 20 4d 6f 76 65 54 6f | 28 32 30 2c 32 30 29 3b | MoveTo|(20,20);|
|000009c0| 0d 20 20 20 20 20 20 20 | 20 44 72 61 77 53 74 72 |. | DrawStr|
|000009d0| 69 6e 67 28 27 20 42 65 | 74 74 65 72 20 62 65 20 |ing(' Be|tter be |
|000009e0| 56 65 6e 69 63 65 27 29 | 3b 0d 20 20 20 20 20 20 |Venice')|;. |
|000009f0| 20 20 47 65 74 46 4e 75 | 6d 28 27 47 65 6e 65 76 | GetFNu|m('Genev|
|00000a00| 61 27 2c 20 74 68 65 46 | 6f 6e 74 49 44 29 3b 0d |a', theF|ontID);.|
|00000a10| 20 20 20 20 20 20 20 20 | 54 65 78 74 46 6f 6e 74 | |TextFont|
|00000a20| 28 74 68 65 46 6f 6e 74 | 49 44 29 3b 0d 20 20 20 |(theFont|ID);. |
|00000a30| 20 20 20 20 20 4d 6f 76 | 65 54 6f 28 32 30 2c 34 | Mov|eTo(20,4|
|00000a40| 30 29 3b 0d 20 20 20 20 | 20 20 20 20 44 72 61 77 |0);. | Draw|
|00000a50| 53 74 72 69 6e 67 28 27 | 47 65 6e 65 76 61 27 29 |String('|Geneva')|
|00000a60| 3b 0d 20 20 20 20 20 20 | 20 20 47 65 74 46 4e 75 |;. | GetFNu|
|00000a70| 6d 28 27 4e 65 77 20 59 | 6f 72 6b 27 2c 20 74 68 |m('New Y|ork', th|
|00000a80| 65 46 6f 6e 74 49 44 29 | 3b 0d 20 20 20 20 20 20 |eFontID)|;. |
|00000a90| 20 20 54 65 78 74 46 6f | 6e 74 28 74 68 65 46 6f | TextFo|nt(theFo|
|00000aa0| 6e 74 49 44 29 3b 0d 20 | 20 20 20 20 20 20 20 4d |ntID);. | M|
|00000ab0| 6f 76 65 54 6f 28 32 30 | 2c 36 30 29 3b 0d 20 20 |oveTo(20|,60);. |
|00000ac0| 20 20 20 20 20 20 44 72 | 61 77 53 74 72 69 6e 67 | Dr|awString|
|00000ad0| 28 27 4e 65 77 20 59 6f | 72 6b 27 29 3b 0d 20 20 |('New Yo|rk');. |
|00000ae0| 20 20 20 20 20 20 47 65 | 74 46 4e 75 6d 28 27 47 | Ge|tFNum('G|
|00000af0| 65 6e 65 76 61 27 2c 20 | 74 68 65 46 6f 6e 74 49 |eneva', |theFontI|
|00000b00| 44 29 3b 0d 20 20 20 20 | 20 20 20 20 54 65 78 74 |D);. | Text|
|00000b10| 46 6f 6e 74 28 74 68 65 | 46 6f 6e 74 49 44 29 3b |Font(the|FontID);|
|00000b20| 0d 20 20 20 20 20 20 20 | 20 4d 6f 76 65 54 6f 28 |. | MoveTo(|
|00000b30| 32 30 2c 38 30 29 3b 0d | 20 20 20 20 20 20 20 20 |20,80);.| |
|00000b40| 44 72 61 77 53 74 72 69 | 6e 67 28 27 47 65 6e 65 |DrawStri|ng('Gene|
|00000b50| 76 61 27 29 3b 0d 20 20 | 20 20 43 6c 6f 73 65 50 |va');. | CloseP|
|00000b60| 69 63 74 75 72 65 3b 20 | 0d 67 65 6e 65 72 61 74 |icture; |.generat|
|00000b70| 65 73 20 61 20 70 69 63 | 74 75 72 65 20 63 6f 6e |es a pic|ture con|
|00000b80| 74 61 69 6e 69 6e 67 20 | 66 6f 6e 74 20 69 6e 66 |taining |font inf|
|00000b90| 6f 72 6d 61 74 69 6f 6e | 20 6c 69 6b 65 20 74 68 |ormation| like th|
|00000ba0| 69 73 3a 0d 20 20 20 20 | 4f 70 43 6f 64 65 20 30 |is:. |OpCode 0|
|00000bb0| 78 30 30 32 43 20 7b 39 | 2c 20 0d 20 20 20 20 20 |x002C {9|, . |
|00000bc0| 20 20 20 22 30 30 30 35 | 20 30 36 35 36 20 36 35 | "0005| 0656 65|
|00000bd0| 36 45 20 36 39 36 33 20 | 36 35 22 7d 20 20 20 20 |6E 6963 |65"} |
|00000be0| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 73 61 76 | | /* sav|
|00000bf0| 65 20 63 75 72 72 65 6e | 74 20 66 6f 6e 74 20 20 |e curren|t font |
|00000c00| 20 20 20 2a 2f 0d 20 20 | 20 20 54 78 46 6f 6e 74 | */. | TxFont|
|00000c10| 20 27 76 65 6e 69 63 65 | 27 0d 20 20 20 20 44 48 | 'venice|'. DH|
|00000c20| 44 56 54 65 78 74 20 7b | 32 30 2c 20 32 30 2c 20 |DVText {|20, 20, |
|00000c30| 22 20 42 65 74 74 65 72 | 20 62 65 20 56 65 6e 69 |" Better| be Veni|
|00000c40| 63 65 22 7d 0d 20 20 20 | 20 4f 70 43 6f 64 65 20 |ce"}. | OpCode |
|00000c50| 30 78 30 30 32 43 20 7b | 39 2c 20 20 20 20 20 20 |0x002C {|9, |
|00000c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c70| 20 20 20 20 2f 2a 20 73 | 61 76 65 20 6e 65 78 74 | /* s|ave next|
|00000c80| 20 66 6f 6e 74 20 6e 61 | 6d 65 20 20 20 2a 2f 0d | font na|me */.|
|00000c90| 20 20 20 20 20 20 20 20 | 22 30 30 30 33 20 30 36 | |"0003 06|
|00000ca0| 34 37 20 36 35 36 45 20 | 36 35 37 36 20 36 31 22 |47 656E |6576 61"|
|00000cb0| 7d 0d 20 20 20 20 54 78 | 46 6f 6e 74 20 27 67 65 |}. Tx|Font 'ge|
|00000cc0| 6e 65 76 61 27 0d 20 20 | 20 20 44 56 54 65 78 74 |neva'. | DVText|
|00000cd0| 20 7b 32 30 2c 20 22 47 | 65 6e 65 76 61 22 7d 0d | {20, "G|eneva"}.|
|00000ce0| 20 20 20 20 4f 70 43 6f | 64 65 20 30 78 30 30 32 | OpCo|de 0x002|
|00000cf0| 43 20 7b 31 31 2c 20 20 | 20 20 20 20 20 20 20 20 |C {11, | |
|00000d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00000d10| 2a 20 64 69 74 74 6f 20 | 20 20 20 20 20 20 20 20 |* ditto | |
|00000d20| 20 20 20 20 20 20 20 20 | 2a 2f 0d 20 20 20 20 20 | |*/. |
|00000d30| 20 20 20 22 30 30 30 32 | 20 30 38 34 45 20 36 35 | "0002| 084E 65|
|00000d40| 37 37 20 32 30 35 39 20 | 36 46 37 32 20 36 42 22 |77 2059 |6F72 6B"|
|00000d50| 7d 0d 20 20 20 20 54 78 | 46 6f 6e 74 20 27 6e 65 |}. Tx|Font 'ne|
|00000d60| 77 59 6f 72 6b 27 0d 20 | 20 20 20 44 56 54 65 78 |wYork'. | DVTex|
|00000d70| 74 20 7b 32 30 2c 20 22 | 4e 65 77 20 59 6f 72 6b |t {20, "|New York|
|00000d80| 22 7d 0d 20 20 20 20 54 | 78 46 6f 6e 74 20 27 67 |"}. T|xFont 'g|
|00000d90| 65 6e 65 76 61 27 20 20 | 20 20 20 20 20 20 20 20 |eneva' | |
|00000da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000db0| 20 20 2f 2a 20 73 65 63 | 6f 6e 64 20 47 65 6e 65 | /* sec|ond Gene|
|00000dc0| 76 61 20 64 6f 65 73 20 | 6e 6f 74 0d 20 20 20 20 |va does |not. |
|00000dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000df0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6e 65 65 | | nee|
|00000e00| 64 20 61 6e 6f 74 68 65 | 72 20 24 30 30 32 43 20 |d anothe|r $002C |
|00000e10| 67 75 79 20 2a 2f 0d 20 | 20 20 20 44 56 54 65 78 |guy */. | DVTex|
|00000e20| 74 20 7b 32 30 2c 20 22 | 47 65 6e 65 76 61 22 7d |t {20, "|Geneva"}|
|00000e30| 0d 54 68 69 73 20 66 65 | 61 74 75 72 65 20 77 6f |.This fe|ature wo|
|00000e40| 72 6b 73 20 72 65 67 61 | 72 64 6c 65 73 73 20 6f |rks rega|rdless o|
|00000e50| 66 20 74 68 65 20 74 79 | 70 65 20 6f 66 20 70 69 |f the ty|pe of pi|
|00000e60| 63 74 75 72 65 20 62 65 | 69 6e 67 20 73 61 76 65 |cture be|ing save|
|00000e70| 64 2c 20 69 6e 63 6c 75 | 64 69 6e 67 20 6f 6c 64 |d, inclu|ding old|
|00000e80| 20 73 74 79 6c 65 20 50 | 49 43 54 73 20 69 6e 20 | style P|ICTs in |
|00000e90| 61 20 62 6c 61 63 6b 20 | 61 6e 64 20 77 68 69 74 |a black |and whit|
|00000ea0| 65 20 70 6f 72 74 2e 20 | 20 55 73 69 6e 67 20 5f |e port. | Using _|
|00000eb0| 4f 70 65 6e 43 50 69 63 | 74 75 72 65 20 69 6e 73 |OpenCPic|ture ins|
|00000ec0| 74 65 61 64 20 6f 66 20 | 5f 4f 70 65 6e 50 69 63 |tead of |_OpenPic|
|00000ed0| 74 75 72 65 20 74 6f 20 | 73 74 61 72 74 20 61 20 |ture to |start a |
|00000ee0| 72 65 63 6f 72 64 69 6e | 67 20 73 65 73 73 69 6f |recordin|g sessio|
|00000ef0| 6e 20 72 65 73 75 6c 74 | 73 20 69 6e 20 74 68 65 |n result|s in the|
|00000f00| 20 73 61 6d 65 20 66 75 | 6e 63 74 69 6f 6e 61 6c | same fu|nctional|
|00000f10| 69 74 79 2e 0d 44 69 72 | 65 63 74 20 50 69 78 50 |ity..Dir|ect PixP|
|00000f20| 61 74 20 53 74 72 75 63 | 74 75 72 65 73 20 4e 6f |at Struc|tures No|
|00000f30| 77 20 53 75 70 70 6f 72 | 74 65 64 0d 51 75 69 63 |w Suppor|ted.Quic|
|00000f40| 6b 44 72 61 77 20 6e 6f | 77 20 73 75 70 70 6f 72 |kDraw no|w suppor|
|00000f50| 74 73 20 31 36 2d 62 69 | 74 20 61 6e 64 20 33 32 |ts 16-bi|t and 32|
|00000f60| 2d 62 69 74 20 70 65 72 | 20 70 69 78 65 6c 20 50 |-bit per| pixel P|
|00000f70| 69 78 50 61 74 20 73 74 | 72 75 63 74 75 72 65 73 |ixPat st|ructures|
|00000f80| 20 28 70 61 74 54 79 70 | 65 20 3d 20 31 29 2e 20 | (patTyp|e = 1). |
|00000f90| 20 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 69 74 | In addi|tion, it|
|00000fa0| 20 6e 6f 77 20 73 75 70 | 70 6f 72 74 73 20 61 20 | now sup|ports a |
|00000fb0| 6e 65 77 20 70 61 74 54 | 79 70 65 20 28 33 29 20 |new patT|ype (3) |
|00000fc0| 77 68 69 63 68 20 75 73 | 65 73 20 64 69 74 68 65 |which us|es dithe|
|00000fd0| 72 69 6e 67 20 77 68 65 | 6e 65 76 65 72 20 31 36 |ring whe|never 16|
|00000fe0| 2d 62 69 74 20 6f 72 20 | 33 32 2d 62 69 74 20 20 |-bit or |32-bit |
|00000ff0| 70 69 78 65 6c 20 70 61 | 74 74 65 72 6e 73 20 61 |pixel pa|tterns a|
|00001000| 72 65 20 64 69 73 70 6c | 61 79 65 64 20 6f 6e 20 |re displ|ayed on |
|00001010| 69 6e 64 65 78 65 64 20 | 64 65 76 69 63 65 73 2e |indexed |devices.|
|00001020| 0d 44 69 72 65 63 74 20 | 27 63 69 63 6e 27 20 52 |.Direct |'cicn' R|
|00001030| 65 73 6f 75 72 63 65 73 | 20 4e 6f 77 20 53 75 70 |esources| Now Sup|
|00001040| 70 6f 72 74 65 64 0d 51 | 75 69 63 6b 44 72 61 77 |ported.Q|uickDraw|
|00001050| 20 6e 6f 77 20 73 75 70 | 70 6f 72 74 73 20 31 36 | now sup|ports 16|
|00001060| 2d 62 69 74 20 61 6e 64 | 20 33 32 2d 62 69 74 20 |-bit and| 32-bit |
|00001070| 70 65 72 20 70 69 78 65 | 6c 20 27 63 69 63 6e 27 |per pixe|l 'cicn'|
|00001080| 20 72 65 73 6f 75 72 63 | 65 73 2e 20 20 54 68 65 | resourc|es. The|
|00001090| 20 31 36 2d 62 69 74 20 | 70 65 72 20 70 69 78 65 | 16-bit |per pixe|
|000010a0| 6c 20 69 73 20 70 61 72 | 74 69 63 75 6c 61 72 6c |l is par|ticularl|
|000010b0| 79 20 63 6f 6f 6c 20 73 | 69 6e 63 65 20 79 6f 75 |y cool s|ince you|
|000010c0| 20 73 61 76 65 20 74 68 | 65 20 73 70 61 63 65 20 | save th|e space |
|000010d0| 72 65 71 75 69 72 65 64 | 20 66 6f 72 20 61 6e 20 |required| for an |
|000010e0| 38 2d 62 69 74 20 27 63 | 6c 75 74 27 2e 0d 47 57 |8-bit 'c|lut'..GW|
|000010f0| 6f 72 6c 64 73 20 43 61 | 6e 20 4e 6f 77 20 42 65 |orlds Ca|n Now Be|
|00001100| 20 41 6c 6c 6f 63 61 74 | 65 64 20 69 6e 20 4d 75 | Allocat|ed in Mu|
|00001110| 6c 74 69 46 69 6e 64 65 | 72 20 54 65 6d 70 6f 72 |ltiFinde|r Tempor|
|00001120| 61 72 79 20 4d 65 6d 6f | 72 79 0d 59 6f 75 20 63 |ary Memo|ry.You c|
|00001130| 61 6e 20 6e 6f 77 20 75 | 73 65 20 74 68 65 20 6e |an now u|se the n|
|00001140| 65 77 20 75 73 65 4d 46 | 54 65 6d 70 42 69 74 20 |ew useMF|TempBit |
|00001150| 28 62 69 74 20 32 29 20 | 69 6e 20 61 20 63 61 6c |(bit 2) |in a cal|
|00001160| 6c 20 74 6f 20 4e 65 77 | 47 57 6f 72 6c 64 20 61 |l to New|GWorld a|
|00001170| 73 20 61 6e 20 6f 70 74 | 69 6f 6e 20 74 6f 20 61 |s an opt|ion to a|
|00001180| 6c 6c 6f 63 61 74 65 20 | 70 69 78 65 6c 73 20 69 |llocate |pixels i|
|00001190| 6e 20 4d 75 6c 74 69 46 | 69 6e 64 65 72 20 74 65 |n MultiF|inder te|
|000011a0| 6d 70 6f 72 61 72 79 20 | 6d 65 6d 6f 72 79 2e 20 |mporary |memory. |
|000011b0| 20 49 6e 20 61 64 64 69 | 74 69 6f 6e 2c 20 79 6f | In addi|tion, yo|
|000011c0| 75 20 63 61 6e 20 6e 6f | 77 20 61 6c 6c 6f 63 61 |u can no|w alloca|
|000011d0| 74 65 20 73 63 72 65 65 | 6e 20 62 75 66 66 65 72 |te scree|n buffer|
|000011e0| 73 20 69 6e 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |s in Mul|tiFinder|
|000011f0| 20 74 65 6d 70 6f 72 61 | 72 79 20 6d 65 6d 6f 72 | tempora|ry memor|
|00001200| 79 20 75 73 69 6e 67 20 | 74 68 65 20 66 6f 6c 6c |y using |the foll|
|00001210| 6f 77 69 6e 67 20 72 6f | 75 74 69 6e 65 2c 20 64 |owing ro|utine, d|
|00001220| 65 66 69 6e 65 64 20 69 | 6e 20 50 61 73 63 61 6c |efined i|n Pascal|
|00001230| 20 61 6e 64 20 43 3a 0d | 46 55 4e 43 54 49 4f 4e | and C:.|FUNCTION|
|00001240| 20 4e 65 77 54 65 6d 70 | 53 63 72 65 65 6e 42 75 | NewTemp|ScreenBu|
|00001250| 66 66 65 72 20 28 67 6c | 6f 62 61 6c 52 65 63 74 |ffer (gl|obalRect|
|00001260| 3a 20 52 65 63 74 3b 20 | 70 75 72 67 65 61 62 6c |: Rect; |purgeabl|
|00001270| 65 3a 20 42 4f 4f 4c 45 | 41 4e 3b 0d 20 20 20 20 |e: BOOLE|AN;. |
|00001280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001290| 20 20 20 20 20 20 20 20 | 20 20 56 41 52 20 67 64 | | VAR gd|
|000012a0| 68 3a 20 47 44 48 61 6e | 64 6c 65 3b 0d 20 20 20 |h: GDHan|dle;. |
|000012b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000012c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 56 41 52 20 | | VAR |
|000012d0| 6f 66 66 73 63 72 65 65 | 6e 50 69 78 4d 61 70 3a |offscree|nPixMap:|
|000012e0| 20 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 29 3a 20 | PixMapH|andle): |
|000012f0| 51 44 45 72 72 3b 0d 20 | 20 20 20 20 20 20 20 20 |QDErr;. | |
|00001300| 20 20 20 20 49 4e 4c 49 | 4e 45 20 24 32 30 33 43 | INLI|NE $203C|
|00001310| 2c 24 30 30 30 45 2c 20 | 24 30 30 31 35 2c 24 41 |,$000E, |$0015,$A|
|00001320| 42 31 44 3b 20 7b 20 4d | 6f 76 65 2e 4c 20 23 24 |B1D; { M|ove.L #$|
|00001330| 30 30 30 45 30 30 31 35 | 2c 44 30 0d 20 20 20 20 |000E0015|,D0. |
|00001340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001360| 20 20 20 20 20 20 20 20 | 20 20 20 5f 51 44 4f 66 | | _QDOf|
|00001370| 66 73 63 72 65 65 6e 0d | 20 20 20 20 20 20 20 20 |fscreen.| |
|00001380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000013a0| 20 20 20 20 20 7d 0d 70 | 61 73 63 61 6c 20 51 44 | }.p|ascal QD|
|000013b0| 45 72 72 20 4e 65 77 54 | 65 6d 70 53 63 72 65 65 |Err NewT|empScree|
|000013c0| 6e 42 75 66 66 65 72 20 | 28 52 65 63 74 20 2a 67 |nBuffer |(Rect *g|
|000013d0| 6c 6f 62 61 6c 52 65 63 | 74 2c 20 42 4f 4f 4c 45 |lobalRec|t, BOOLE|
|000013e0| 41 4e 20 70 75 72 67 65 | 61 62 6c 65 2c 0d 20 20 |AN purge|able,. |
|000013f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001400| 20 20 20 20 20 20 20 20 | 20 20 20 20 47 44 48 61 | | GDHa|
|00001410| 6e 64 6c 65 20 2a 67 64 | 68 2c 0d 20 20 20 20 20 |ndle *gd|h,. |
|00001420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001430| 20 20 20 20 20 20 20 20 | 20 50 69 78 4d 61 70 48 | | PixMapH|
|00001440| 61 6e 64 6c 65 ca 2a 6f | 66 66 73 63 72 65 65 6e |andle.*o|ffscreen|
|00001450| 50 69 78 4d 61 70 29 0d | 20 20 20 20 20 20 20 20 |PixMap).| |
|00001460| 20 20 20 20 20 3d 7b 30 | 78 32 30 33 43 2c 30 78 | ={0|x203C,0x|
|00001470| 30 30 30 45 2c 30 78 30 | 30 31 35 2c 30 78 41 42 |000E,0x0|015,0xAB|
|00001480| 31 44 7d 3b 20 0d 49 6e | 64 65 78 65 64 20 74 6f |1D}; .In|dexed to|
|00001490| 20 49 6e 64 65 78 65 64 | 20 44 69 74 68 65 72 69 | Indexed| Ditheri|
|000014a0| 6e 67 0d 5f 43 6f 70 79 | 42 69 74 73 20 6e 6f 77 |ng._Copy|Bits now|
|000014b0| 20 73 75 70 70 6f 72 74 | 73 20 74 68 65 20 64 69 | support|s the di|
|000014c0| 74 68 65 72 43 6f 70 79 | 20 74 72 61 6e 73 66 65 |therCopy| transfe|
|000014d0| 72 20 6d 6f 64 65 20 77 | 68 65 6e 65 76 65 72 20 |r mode w|henever |
|000014e0| 74 68 65 20 64 65 73 74 | 69 6e 61 74 69 6f 6e 20 |the dest|ination |
|000014f0| 64 65 76 69 63 65 20 69 | 73 20 62 65 74 77 65 65 |device i|s betwee|
|00001500| 6e 20 6f 6e 65 20 61 6e | 64 20 65 69 67 68 74 20 |n one an|d eight |
|00001510| 62 69 74 73 20 70 65 72 | 20 70 69 78 65 6c 2c 20 |bits per| pixel, |
|00001520| 72 65 67 61 72 64 6c 65 | 73 73 20 6f 66 20 74 68 |regardle|ss of th|
|00001530| 65 20 64 65 70 74 68 20 | 6f 66 20 74 68 65 20 73 |e depth |of the s|
|00001540| 6f 75 72 63 65 20 69 6d | 61 67 65 2e 20 20 57 69 |ource im|age. Wi|
|00001550| 74 68 20 74 68 69 73 20 | 73 75 70 70 6f 72 74 2c |th this |support,|
|00001560| 20 61 6e 20 65 69 67 68 | 74 2d 62 69 74 20 69 6d | an eigh|t-bit im|
|00001570| 61 67 65 20 63 61 6e 20 | 6e 6f 77 20 62 65 20 61 |age can |now be a|
|00001580| 70 70 72 6f 78 69 6d 61 | 74 65 64 20 6f 6e 20 61 |pproxima|ted on a|
|00001590| 20 6f 6e 65 2d 62 69 74 | 20 6f 72 20 61 20 66 6f | one-bit| or a fo|
|000015a0| 75 72 2d 62 69 74 20 64 | 65 76 69 63 65 20 62 79 |ur-bit d|evice by|
|000015b0| 20 75 73 69 6e 67 20 65 | 72 72 6f 72 20 64 69 66 | using e|rror dif|
|000015c0| 66 75 73 69 6f 6e 2e 20 | 20 46 75 72 74 68 65 72 |fusion. | Further|
|000015d0| 6d 6f 72 65 2c 20 61 6e | 20 65 69 67 68 74 2d 62 |more, an| eight-b|
|000015e0| 69 74 20 69 6d 61 67 65 | 20 63 6f 75 6c 64 20 61 |it image| could a|
|000015f0| 6c 73 6f 20 62 65 20 64 | 69 74 68 65 72 65 64 20 |lso be d|ithered |
|00001600| 74 6f 20 61 20 64 69 66 | 66 65 72 65 6e 74 20 73 |to a dif|ferent s|
|00001610| 65 74 20 6f 66 20 32 35 | 36 20 63 6f 6c 6f 72 73 |et of 25|6 colors|
|00001620| 20 6f 72 20 61 20 66 6f | 75 72 2d 62 69 74 20 69 | or a fo|ur-bit i|
|00001630| 6d 61 67 65 20 63 6f 75 | 6c 64 20 62 65 20 64 69 |mage cou|ld be di|
|00001640| 74 68 65 72 65 64 20 74 | 6f 20 61 6e 20 65 69 67 |thered t|o an eig|
|00001650| 68 74 2d 62 69 74 20 64 | 65 76 69 63 65 20 74 68 |ht-bit d|evice th|
|00001660| 61 74 20 64 6f 65 73 20 | 6e 6f 74 20 68 61 76 65 |at does |not have|
|00001670| 20 74 68 65 20 64 65 73 | 69 72 65 64 20 63 6f 6c | the des|ired col|
|00001680| 6f 72 73 2e 0d 33 32 2d | 42 69 74 20 41 64 64 72 |ors..32-|Bit Addr|
|00001690| 65 73 73 65 64 20 50 69 | 78 4d 61 70 20 53 74 72 |essed Pi|xMap Str|
|000016a0| 75 63 74 75 72 65 73 0d | 56 65 72 73 69 6f 6e 20 |uctures.|Version |
|000016b0| 31 2e 32 20 64 65 66 69 | 6e 65 73 20 61 20 6e 65 |1.2 defi|nes a ne|
|000016c0| 77 20 70 6d 56 65 72 73 | 69 6f 6e 20 28 62 61 73 |w pmVers|ion (bas|
|000016d0| 65 41 64 64 72 33 32 20 | 3d 20 34 29 20 66 6f 72 |eAddr32 |= 4) for|
|000016e0| 20 33 32 2d 62 69 74 20 | 70 6f 69 6e 74 65 72 20 | 32-bit |pointer |
|000016f0| 62 61 73 65 41 64 64 72 | 20 76 61 6c 75 65 73 2e |baseAddr| values.|
|00001700| 20 20 54 68 65 20 62 61 | 73 65 41 64 64 72 20 6f | The ba|seAddr o|
|00001710| 66 20 73 75 63 68 20 50 | 69 78 4d 61 70 20 73 74 |f such P|ixMap st|
|00001720| 72 75 63 74 75 72 65 73 | 20 69 73 20 74 72 65 61 |ructures| is trea|
|00001730| 74 65 64 20 61 73 20 61 | 20 33 32 2d 62 69 74 20 |ted as a| 32-bit |
|00001740| 61 64 64 72 65 73 73 2c | 20 73 6f 20 6e 6f 20 73 |address,| so no s|
|00001750| 74 72 69 70 70 69 6e 67 | 20 6f 72 20 61 64 64 72 |tripping| or addr|
|00001760| 65 73 73 20 74 72 61 6e | 73 6c 61 74 69 6f 6e 20 |ess tran|slation |
|00001770| 69 73 20 70 65 72 66 6f | 72 6d 65 64 20 6f 6e 20 |is perfo|rmed on |
|00001780| 69 74 20 69 6e 20 33 32 | 2d 62 69 74 20 6d 6f 64 |it in 32|-bit mod|
|00001790| 65 2e 20 20 54 68 69 73 | 20 69 73 20 61 20 73 70 |e. This| is a sp|
|000017a0| 65 63 69 61 6c 6c 79 20 | 75 73 65 66 75 6c 20 66 |ecially |useful f|
|000017b0| 65 61 74 75 72 65 20 77 | 68 65 6e 20 74 68 65 20 |eature w|hen the |
|000017c0| 62 61 73 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 |base add|ress of |
|000017d0| 61 20 50 69 78 4d 61 70 | 20 70 6f 69 6e 74 73 20 |a PixMap| points |
|000017e0| 74 6f 20 61 20 4e 75 42 | 75 73 aa 20 61 64 64 72 |to a NuB|us. addr|
|000017f0| 65 73 73 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |ess, for| example|
|00001800| 20 69 6e 20 61 20 76 69 | 64 65 6f 20 67 72 61 62 | in a vi|deo grab|
|00001810| 62 65 72 20 62 6f 61 72 | 64 2e 0d 41 20 6e 65 77 |ber boar|d..A new|
|00001820| 20 63 61 6c 6c 2c 20 50 | 69 78 6d 61 70 33 32 42 | call, P|ixmap32B|
|00001830| 69 74 2c 20 69 73 20 6e | 6f 77 20 61 76 61 69 6c |it, is n|ow avail|
|00001840| 61 62 6c 65 20 74 6f 20 | 69 6e 71 75 69 72 65 20 |able to |inquire |
|00001850| 69 66 20 61 20 67 69 76 | 65 6e 20 50 69 78 4d 61 |if a giv|en PixMa|
|00001860| 70 20 72 65 71 75 69 72 | 65 73 20 33 32 2d 62 69 |p requir|es 32-bi|
|00001870| 74 20 61 64 64 72 65 73 | 73 69 6e 67 2e 0d 46 55 |t addres|sing..FU|
|00001880| 4e 43 54 49 4f 4e 20 50 | 69 78 6d 61 70 33 32 42 |NCTION P|ixmap32B|
|00001890| 69 74 28 70 6d 68 3a 70 | 69 78 4d 61 70 48 61 6e |it(pmh:p|ixMapHan|
|000018a0| 64 6c 65 29 3a 42 6f 6f | 6c 65 61 6e 3b 0d 20 20 |dle):Boo|lean;. |
|000018b0| 20 20 49 4e 4c 49 4e 45 | 20 24 32 30 33 43 2c 24 | INLINE| $203C,$|
|000018c0| 30 30 30 34 2c 20 24 30 | 30 31 36 2c 24 41 42 31 |0004, $0|016,$AB1|
|000018d0| 44 3b 20 7b 20 4d 6f 76 | 65 2e 4c 20 23 24 30 30 |D; { Mov|e.L #$00|
|000018e0| 30 34 30 30 31 36 2c 44 | 30 0d 20 20 20 20 20 20 |040016,D|0. |
|000018f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001910| 5f 51 44 4f 66 66 73 63 | 72 65 65 6e 0d 20 20 20 |_QDOffsc|reen. |
|00001920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001940| 20 7d 0d 70 61 73 63 61 | 6c 20 42 4f 4f 4c 45 41 | }.pasca|l BOOLEA|
|00001950| 4e 20 50 69 78 6d 61 70 | 33 32 42 69 74 28 70 69 |N Pixmap|32Bit(pi|
|00001960| 78 4d 61 70 48 61 6e 64 | 6c 65 20 70 6d 68 29 0d |xMapHand|le pmh).|
|00001970| 20 20 20 20 3d 20 7b 30 | 78 32 30 33 43 2c 30 78 | = {0|x203C,0x|
|00001980| 30 30 30 34 2c 20 30 78 | 30 30 31 36 2c 30 78 41 |0004, 0x|0016,0xA|
|00001990| 42 31 44 7d 3b 20 0d 55 | 70 64 61 74 65 64 20 47 |B1D}; .U|pdated G|
|000019a0| 65 74 50 69 78 42 61 73 | 65 41 64 64 72 65 73 73 |etPixBas|eAddress|
|000019b0| 0d 56 65 72 73 69 6f 6e | 20 31 2e 32 20 75 70 64 |.Version| 1.2 upd|
|000019c0| 61 74 65 73 20 47 65 74 | 50 69 78 42 61 73 65 41 |ates Get|PixBaseA|
|000019d0| 64 64 72 65 73 73 20 74 | 6f 20 72 65 74 75 72 6e |ddress t|o return|
|000019e0| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 | the add|ress of |
|000019f0| 61 6e 79 20 50 69 78 4d | 61 70 2e 20 20 54 68 65 |any PixM|ap. The|
|00001a00| 20 72 6f 75 74 69 6e 65 | 20 64 6f 65 73 20 74 68 | routine| does th|
|00001a10| 65 20 72 69 67 68 74 20 | 61 64 64 72 65 73 73 20 |e right |address |
|00001a20| 74 72 61 6e 73 6c 61 74 | 69 6f 6e 20 6f 72 20 73 |translat|ion or s|
|00001a30| 74 72 69 70 70 69 6e 67 | 20 66 6f 72 20 61 6c 6c |tripping| for all|
|00001a40| 20 50 69 78 4d 61 70 20 | 73 74 72 75 63 74 75 72 | PixMap |structur|
|00001a50| 65 73 2c 20 69 6e 63 6c | 75 64 69 6e 67 20 73 63 |es, incl|uding sc|
|00001a60| 72 65 65 6e 20 64 65 76 | 69 63 65 73 2c 20 75 6e |reen dev|ices, un|
|00001a70| 6c 6f 63 6b 65 64 20 47 | 57 6f 72 6c 64 73 2c 20 |locked G|Worlds, |
|00001a80| 61 6e 64 20 33 32 2d 62 | 69 74 20 61 64 64 72 65 |and 32-b|it addre|
|00001a90| 73 73 65 64 20 50 69 78 | 4d 61 70 20 73 74 72 75 |ssed Pix|Map stru|
|00001aa0| 63 74 75 72 65 73 2e 20 | 20 54 68 65 20 61 64 64 |ctures. | The add|
|00001ab0| 72 65 73 73 20 69 74 20 | 72 65 74 75 72 6e 73 20 |ress it |returns |
|00001ac0| 69 73 20 6f 6e 6c 79 20 | 76 61 6c 69 64 20 69 6e |is only |valid in|
|00001ad0| 20 33 32 2d 62 69 74 20 | 61 64 64 72 65 73 73 69 | 32-bit |addressi|
|00001ae0| 6e 67 20 6d 6f 64 65 2e | 20 41 6c 73 6f 20 75 6e |ng mode.| Also un|
|00001af0| 6c 65 73 73 20 74 68 65 | 20 50 69 78 4d 61 70 20 |less the| PixMap |
|00001b00| 69 73 20 6c 6f 63 6b 65 | 64 20 61 6e 64 20 6d 61 |is locke|d and ma|
|00001b10| 64 65 20 75 6e 70 75 72 | 67 65 61 62 6c 65 2c 20 |de unpur|geable, |
|00001b20| 74 68 65 20 61 64 64 72 | 65 73 73 20 72 65 74 75 |the addr|ess retu|
|00001b30| 72 6e 65 64 20 62 79 20 | 47 65 74 50 69 78 42 61 |rned by |GetPixBa|
|00001b40| 73 65 41 64 64 72 65 73 | 73 20 69 73 20 6f 6e 6c |seAddres|s is onl|
|00001b50| 79 20 76 61 6c 69 64 20 | 75 6e 74 69 6c 20 61 6e |y valid |until an|
|00001b60| 79 20 63 61 6c 6c 20 74 | 6f 20 51 75 69 63 6b 44 |y call t|o QuickD|
|00001b70| 72 61 77 20 6f 72 20 74 | 68 65 20 74 6f 6f 6c 62 |raw or t|he toolb|
|00001b80| 6f 78 20 69 73 20 6d 61 | 64 65 2e 0d 5f 43 6f 70 |ox is ma|de.._Cop|
|00001b90| 79 42 69 74 73 20 66 72 | 6f 6d 20 53 63 72 65 65 |yBits fr|om Scree|
|00001ba0| 6e 20 44 65 76 69 63 65 | 73 0d 54 68 65 20 70 69 |n Device|s.The pi|
|00001bb0| 63 74 75 72 65 20 72 65 | 63 6f 72 64 69 6e 67 20 |cture re|cording |
|00001bc0| 6d 65 63 68 61 6e 69 73 | 6d 20 68 61 73 20 63 68 |mechanis|m has ch|
|00001bd0| 61 6e 67 65 64 20 73 6f | 20 74 68 61 74 20 69 66 |anged so| that if|
|00001be0| 20 79 6f 75 20 63 61 6c | 6c 20 5f 43 6f 70 79 42 | you cal|l _CopyB|
|00001bf0| 69 74 73 20 77 68 69 6c | 65 20 72 65 63 6f 72 64 |its whil|e record|
|00001c00| 69 6e 67 20 61 20 70 69 | 63 74 75 72 65 20 77 69 |ing a pi|cture wi|
|00001c10| 74 68 20 74 68 65 20 73 | 6f 75 72 63 65 20 50 69 |th the s|ource Pi|
|00001c20| 78 4d 61 70 20 62 65 69 | 6e 67 20 61 20 73 63 72 |xMap bei|ng a scr|
|00001c30| 65 65 6e 20 64 65 76 69 | 63 65 2c 20 74 68 65 20 |een devi|ce, the |
|00001c40| 64 61 74 61 20 69 73 20 | 63 6f 72 72 65 63 74 6c |data is |correctl|
|00001c50| 79 20 61 63 63 75 6d 75 | 6c 61 74 65 64 20 69 6e |y accumu|lated in|
|00001c60| 74 6f 20 74 68 65 20 70 | 69 63 74 75 72 65 2e 20 |to the p|icture. |
|00001c70| 20 4e 6f 74 65 20 74 68 | 61 74 20 69 66 20 74 68 | Note th|at if th|
|00001c80| 65 20 73 63 72 65 65 6e | 20 62 65 69 6e 67 20 63 |e screen| being c|
|00001c90| 6f 70 69 65 64 20 69 73 | 20 6e 6f 74 20 74 68 65 |opied is| not the|
|00001ca0| 20 6d 61 69 6e 20 73 63 | 72 65 65 6e 2c 20 74 68 | main sc|reen, th|
|00001cb0| 65 6e 20 74 68 65 20 50 | 69 78 4d 61 70 20 6d 75 |en the P|ixMap mu|
|00001cc0| 73 74 20 62 65 20 61 20 | 33 32 2d 62 69 74 20 61 |st be a |32-bit a|
|00001cd0| 64 64 72 65 73 73 65 64 | 20 50 69 78 4d 61 70 2e |ddressed| PixMap.|
|00001ce0| 20 20 4e 6f 20 61 75 78 | 69 6c 69 61 72 79 20 73 | No aux|iliary s|
|00001cf0| 63 72 65 65 6e 20 62 75 | 66 66 65 72 20 69 73 20 |creen bu|ffer is |
|00001d00| 61 6c 6c 6f 63 61 74 65 | 64 20 69 66 20 74 68 65 |allocate|d if the|
|00001d10| 20 73 6f 75 72 63 65 20 | 72 65 63 74 61 6e 67 6c | source |rectangl|
|00001d20| 65 20 63 6f 76 65 72 73 | 20 6f 6e 6c 79 20 6f 6e |e covers| only on|
|00001d30| 65 20 73 63 72 65 65 6e | 2e 0d 4e 65 77 20 50 69 |e screen|..New Pi|
|00001d40| 63 74 75 72 65 20 52 65 | 63 6f 72 64 69 6e 67 20 |cture Re|cording |
|00001d50| 54 72 61 70 0d 56 65 72 | 73 69 6f 6e 20 31 2e 32 |Trap.Ver|sion 1.2|
|00001d60| 20 61 64 64 73 20 61 20 | 6e 65 77 20 63 61 6c 6c | adds a |new call|
|00001d70| 2c 20 5f 4f 70 65 6e 43 | 50 69 63 74 75 72 65 2c |, _OpenC|Picture,|
|00001d80| 20 74 6f 20 63 72 65 61 | 74 65 20 70 69 63 74 75 | to crea|te pictu|
|00001d90| 72 65 73 20 74 68 61 74 | 20 63 6f 6e 74 61 69 6e |res that| contain|
|00001da0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 72 65 67 | informa|tion reg|
|00001db0| 61 72 64 69 6e 67 20 74 | 68 65 20 6e 61 74 69 76 |arding t|he nativ|
|00001dc0| 65 20 72 65 73 6f 6c 75 | 74 69 6f 6e 20 6f 66 20 |e resolu|tion of |
|00001dd0| 74 68 65 20 72 65 63 6f | 72 64 65 64 20 69 6d 61 |the reco|rded ima|
|00001de0| 67 65 2e 20 20 57 68 65 | 6e 20 51 75 69 63 6b 44 |ge. Whe|n QuickD|
|00001df0| 72 61 77 20 64 72 61 77 | 73 20 74 68 69 73 20 70 |raw draw|s this p|
|00001e00| 69 63 74 75 72 65 2c 20 | 69 74 20 73 63 61 6c 65 |icture, |it scale|
|00001e10| 73 20 74 68 65 20 69 6d | 61 67 65 20 74 6f 20 74 |s the im|age to t|
|00001e20| 68 65 20 72 65 73 6f 6c | 75 74 69 6f 6e 20 6f 66 |he resol|ution of|
|00001e30| 20 74 68 65 20 74 61 72 | 67 65 74 20 64 65 76 69 | the tar|get devi|
|00001e40| 63 65 2e 20 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ce. App|lication|
|00001e50| 73 20 74 68 61 74 20 6e | 65 65 64 20 74 6f 20 73 |s that n|eed to s|
|00001e60| 63 61 6c 65 20 74 68 65 | 20 69 6d 61 67 65 73 20 |cale the| images |
|00001e70| 64 69 72 65 63 74 6c 79 | 20 63 61 6e 20 61 6c 73 |directly| can als|
|00001e80| 6f 20 61 63 63 65 73 73 | 20 74 68 69 73 20 69 6e |o access| this in|
|00001e90| 66 6f 72 6d 61 74 69 6f | 6e 2e 0d 46 55 4e 43 54 |formatio|n..FUNCT|
|00001ea0| 49 4f 4e 20 4f 70 65 6e | 43 50 69 63 74 75 72 65 |ION Open|CPicture|
|00001eb0| 28 56 41 52 20 43 50 69 | 63 74 49 6e 66 6f 3a 43 |(VAR CPi|ctInfo:C|
|00001ec0| 50 69 63 74 52 65 63 6f | 72 64 29 3a 50 69 63 48 |PictReco|rd):PicH|
|00001ed0| 61 6e 64 6c 65 3b 0d 20 | 20 20 20 49 4e 4c 49 4e |andle;. | INLIN|
|00001ee0| 45 20 24 41 41 32 30 3b | 0d 70 61 73 63 61 6c 20 |E $AA20;|.pascal |
|00001ef0| 50 69 63 48 61 6e 64 6c | 65 20 4f 70 65 6e 43 50 |PicHandl|e OpenCP|
|00001f00| 69 63 74 75 72 65 28 43 | 50 69 63 74 52 65 63 6f |icture(C|PictReco|
|00001f10| 72 64 20 2a 43 50 69 63 | 74 49 6e 66 6f 29 0d 20 |rd *CPic|tInfo). |
|00001f20| 20 20 20 3d 20 20 30 78 | 41 41 32 30 3b 0d 77 68 | = 0x|AA20;.wh|
|00001f30| 65 72 65 0d 73 74 72 75 | 63 74 20 43 50 69 63 74 |ere.stru|ct CPict|
|00001f40| 52 65 63 6f 72 64 20 7b | 0d 20 20 20 20 20 20 52 |Record {|. R|
|00001f50| 65 63 74 20 43 50 69 63 | 46 72 61 6d 65 3b 20 20 |ect CPic|Frame; |
|00001f60| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 42 6f 75 6e | | /* Boun|
|00001f70| 64 69 6e 67 20 72 65 63 | 74 20 6f 66 20 50 69 63 |ding rec|t of Pic|
|00001f80| 74 75 72 65 20 61 74 20 | 6e 61 74 69 76 65 20 72 |ture at |native r|
|00001f90| 65 73 6f 6c 75 74 69 6f | 6e 20 2a 2f 0d 20 20 20 |esolutio|n */. |
|00001fa0| 20 20 20 46 69 78 65 64 | 20 43 50 69 63 48 52 65 | Fixed| CPicHRe|
|00001fb0| 73 3b 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |s; | /* |
|00001fc0| 6e 61 74 69 76 65 20 68 | 6f 72 69 7a 6f 6e 74 61 |native h|orizonta|
|00001fd0| 6c 20 72 65 73 6f 6c 75 | 74 69 6f 6e 20 69 6e 20 |l resolu|tion in |
|00001fe0| 70 69 78 65 6c 73 2f 69 | 6e 63 68 20 20 20 2a 2f |pixels/i|nch */|
|00001ff0| 0d 20 20 20 20 20 20 46 | 69 78 65 64 20 43 50 69 |. F|ixed CPi|
|00002000| 63 56 52 65 73 3b 20 20 | 20 20 20 20 20 20 20 20 |cVRes; | |
|00002010| 20 2f 2a 20 6e 61 74 69 | 76 65 20 76 65 72 74 69 | /* nati|ve verti|
|00002020| 63 61 6c 20 72 65 73 6f | 6c 75 74 69 6f 6e 20 69 |cal reso|lution i|
|00002030| 6e 20 70 69 78 65 6c 73 | 2f 69 6e 63 68 20 20 20 |n pixels|/inch |
|00002040| 20 20 2a 2f 0d 20 20 20 | 20 20 20 73 68 6f 72 74 | */. | short|
|00002050| 20 43 50 69 63 56 65 72 | 73 69 6f 6e 3b 20 20 20 | CPicVer|sion; |
|00002060| 20 20 20 20 20 2f 2a 20 | 76 65 72 73 69 6f 6e 20 | /* |version |
|00002070| 6f 66 20 74 68 69 73 20 | 50 49 43 54 20 69 6e 66 |of this |PICT inf|
|00002080| 6f 20 73 65 74 20 74 6f | 20 2d 32 20 20 20 20 20 |o set to| -2 |
|00002090| 20 20 20 20 20 20 2a 2f | 0d 20 20 20 20 20 20 73 | */|. s|
|000020a0| 68 6f 72 74 20 72 65 73 | 65 72 76 65 64 3b 20 20 |hort res|erved; |
|000020b0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 66 6f 72 20 | | /* for |
|000020c0| 66 75 74 75 72 65 20 65 | 78 70 61 6e 73 69 6f 6e |future e|xpansion|
|000020d0| 20 73 65 74 20 74 6f 20 | 7a 65 72 6f 20 20 20 20 | set to |zero |
|000020e0| 20 20 20 20 20 20 20 20 | 20 20 2a 2f 0d 20 20 20 | | */. |
|000020f0| 20 20 20 6c 6f 6e 67 20 | 72 65 73 65 72 76 65 64 | long |reserved|
|00002100| 3b 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 |; | /* |
|00002110| 66 6f 72 20 66 75 74 75 | 72 65 20 65 78 70 61 6e |for futu|re expan|
|00002120| 73 69 6f 6e 20 73 65 74 | 20 74 6f 20 7a 65 72 6f |sion set| to zero|
|00002130| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2f | | */|
|00002140| 0d 20 20 20 20 20 20 20 | 20 7d 3b 0d 54 68 65 20 |. | };.The |
|00002150| 6e 65 77 20 70 69 63 74 | 75 72 65 20 68 65 61 64 |new pict|ure head|
|00002160| 65 72 20 64 61 74 61 20 | 6c 6f 6f 6b 73 20 6c 69 |er data |looks li|
|00002170| 6b 65 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |ke the f|ollowing|
|00002180| 3a 0d 53 69 7a 65 20 69 | 6e 20 62 79 74 65 73 09 |:.Size i|n bytes.|
|00002190| 4e 61 6d 65 09 44 65 73 | 63 72 69 70 74 69 6f 6e |Name.Des|cription|
|000021a0| 0d 09 32 09 70 69 63 53 | 69 7a 65 09 6c 6f 77 20 |..2.picS|ize.low |
|000021b0| 77 6f 72 64 20 6f 66 20 | 70 69 63 74 75 72 65 20 |word of |picture |
|000021c0| 73 69 7a 65 0d 09 38 09 | 70 69 63 46 72 61 6d 65 |size..8.|picFrame|
|000021d0| 09 62 6f 75 6e 64 69 6e | 67 20 62 6f 78 20 61 74 |.boundin|g box at|
|000021e0| 20 37 32 20 64 70 69 0d | 50 69 63 74 75 72 65 20 | 72 dpi.|Picture |
|000021f0| 48 65 61 64 65 72 0d 32 | 09 76 65 72 73 69 6f 6e |Header.2|.version|
|00002200| 20 6f 70 09 76 65 72 73 | 69 6f 6e 20 6f 70 63 6f | op.vers|ion opco|
|00002210| 64 65 20 3d 20 24 30 30 | 31 31 0d 32 09 76 65 72 |de = $00|11.2.ver|
|00002220| 73 69 6f 6e 09 76 65 72 | 73 69 6f 6e 20 6e 75 6d |sion.ver|sion num|
|00002230| 62 65 72 20 3d 20 24 30 | 32 46 46 0d 32 09 48 65 |ber = $0|2FF.2.He|
|00002240| 61 64 65 72 20 6f 70 09 | 68 65 61 64 65 72 20 6f |ader op.|header o|
|00002250| 70 63 6f 64 65 20 20 3d | 20 24 30 43 30 30 0d 32 |pcode =| $0C00.2|
|00002260| 09 76 65 72 73 69 6f 6e | 09 2d 32 20 66 6f 72 20 |.version|.-2 for |
|00002270| 50 49 43 54 73 20 63 72 | 65 61 74 65 64 20 77 69 |PICTs cr|eated wi|
|00002280| 74 68 20 5f 4f 70 65 6e | 43 50 69 63 74 75 72 65 |th _Open|CPicture|
|00002290| 0d 32 09 72 65 73 65 72 | 76 65 64 0d 34 09 48 52 |.2.reser|ved.4.HR|
|000022a0| 65 73 09 6e 61 74 69 76 | 65 20 68 6f 72 69 7a 6f |es.nativ|e horizo|
|000022b0| 6e 74 61 6c 20 72 65 73 | 6f 6c 75 74 69 6f 6e 20 |ntal res|olution |
|000022c0| 28 46 69 78 65 64 29 0d | 34 09 56 52 65 73 09 6e |(Fixed).|4.VRes.n|
|000022d0| 61 74 69 76 65 20 76 65 | 72 74 69 63 61 6c 20 72 |ative ve|rtical r|
|000022e0| 65 73 6f 6c 75 74 69 6f | 6e 20 28 46 69 78 65 64 |esolutio|n (Fixed|
|000022f0| 29 0d 38 09 53 72 63 52 | 65 63 74 09 6e 61 74 69 |).8.SrcR|ect.nati|
|00002300| 76 65 20 73 6f 75 72 63 | 65 20 72 65 63 74 61 6e |ve sourc|e rectan|
|00002310| 67 6c 65 0d 34 09 72 65 | 73 65 72 76 65 64 0d 54 |gle.4.re|served.T|
|00002320| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 69 73 20 |he follo|wing is |
|00002330| 61 20 73 61 6d 70 6c 65 | 20 50 49 43 54 20 63 72 |a sample| PICT cr|
|00002340| 65 61 74 65 64 20 77 69 | 74 68 20 5f 4f 70 65 6e |eated wi|th _Open|
|00002350| 43 50 69 63 74 75 72 65 | 3a 0d 20 20 20 20 30 30 |CPicture|:. 00|
|00002360| 20 34 38 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | 48 | |
|00002370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|00002380| 6c 6f 77 20 77 6f 72 64 | 20 6f 66 20 73 69 7a 65 |low word| of size|
|00002390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2f | | */|
|000023a0| 0d 20 20 20 20 30 30 20 | 30 30 20 30 30 20 30 30 |. 00 |00 00 00|
|000023b0| 20 30 30 20 37 44 20 30 | 30 20 37 44 20 20 20 20 | 00 7D 0|0 7D |
|000023c0| 20 20 20 20 2f 2a 20 70 | 69 63 46 72 61 6d 65 20 | /* p|icFrame |
|000023d0| 61 74 20 37 32 20 64 70 | 69 20 20 20 20 20 20 20 |at 72 dp|i |
|000023e0| 20 20 20 20 20 2a 2f 0d | 20 20 20 20 30 30 20 31 | */.| 00 1|
|000023f0| 31 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |1 | |
|00002400| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 50 49 | | /* PI|
|00002410| 43 54 20 76 65 72 73 69 | 6f 6e 20 6f 70 63 6f 64 |CT versi|on opcod|
|00002420| 65 20 20 20 20 20 20 20 | 20 20 20 20 2a 2f 0d 20 |e | */. |
|00002430| 20 20 20 30 32 20 46 46 | 20 20 20 20 20 20 20 20 | 02 FF| |
|00002440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002450| 20 20 2f 2a 20 76 65 72 | 73 69 6f 6e 20 6e 75 6d | /* ver|sion num|
|00002460| 62 65 72 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ber | |
|00002470| 20 20 20 2a 2f 0d 20 20 | 20 20 30 43 20 30 30 20 | */. | 0C 00 |
|00002480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002490| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 50 49 43 54 | | /* PICT|
|000024a0| 20 68 65 61 64 65 72 20 | 4f 70 63 6f 64 65 20 20 | header |Opcode |
|000024b0| 20 20 20 20 20 20 20 20 | 20 20 2a 2f 0d 20 20 20 | | */. |
|000024c0| 20 46 46 20 46 45 20 20 | 20 20 20 20 20 20 20 20 | FF FE | |
|000024d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024e0| 2f 2a 20 50 49 43 54 20 | 76 65 72 73 69 6f 6e 20 |/* PICT |version |
|000024f0| 2d 32 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |-2 | |
|00002500| 20 2a 2f 0d 20 20 20 20 | 30 30 20 30 30 20 20 20 | */. |00 00 |
|00002510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002520| 20 20 20 20 20 20 20 2f | 2a 20 72 65 73 65 72 76 | /|* reserv|
|00002530| 65 64 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ed | |
|00002540| 20 20 20 20 20 20 20 20 | 2a 2f 0d 20 20 20 20 30 | |*/. 0|
|00002550| 31 20 32 30 20 30 30 20 | 30 30 20 20 20 20 20 20 |1 20 00 |00 |
|00002560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a | | /*|
|00002570| 20 48 52 65 73 20 28 46 | 69 78 65 64 29 20 20 20 | HRes (F|ixed) |
|00002580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2a | | *|
|00002590| 2f 0d 20 20 20 20 30 31 | 20 32 30 20 30 30 20 30 |/. 01| 20 00 0|
|000025a0| 30 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |0 | |
|000025b0| 20 20 20 20 20 2f 2a 20 | 56 52 65 73 20 28 46 69 | /* |VRes (Fi|
|000025c0| 78 65 64 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |xed) | |
|000025d0| 20 20 20 20 20 20 2a 2f | 0d 20 20 20 20 30 30 20 | */|. 00 |
|000025e0| 30 30 20 30 30 20 30 30 | 20 30 31 20 46 34 20 30 |00 00 00| 01 F4 0|
|000025f0| 31 20 46 34 20 20 20 20 | 20 20 20 20 2f 2a 20 70 |1 F4 | /* p|
|00002600| 69 63 46 72 61 6d 65 20 | 61 74 20 6e 61 74 69 76 |icFrame |at nativ|
|00002610| 65 20 72 65 73 6f 6c 75 | 74 69 6f 6e 20 2a 2f 0d |e resolu|tion */.|
|00002620| 20 20 20 20 30 30 20 30 | 30 20 30 30 20 30 30 20 | 00 0|0 00 00 |
|00002630| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002640| 20 20 20 2f 2a 20 72 65 | 73 65 72 76 65 64 20 20 | /* re|served |
|00002650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002660| 20 20 20 20 2a 2f 0d 20 | 20 20 20 2f 2a 20 70 69 | */. | /* pi|
|00002670| 63 74 75 72 65 20 64 61 | 74 61 20 66 6f 6c 6c 6f |cture da|ta follo|
|00002680| 77 73 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ws | |
|00002690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026a0| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2f 0d 20 20 | | */. |
|000026b0| 20 20 30 30 20 46 46 20 | 20 20 20 20 20 20 20 20 | 00 FF | |
|000026c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000026d0| 20 2f 2a 20 65 6e 64 20 | 6f 66 20 70 69 63 74 75 | /* end |of pictu|
|000026e0| 72 65 20 6f 70 63 6f 64 | 65 20 20 20 20 20 20 20 |re opcod|e |
|000026f0| 20 20 2a 2f 0d 52 61 6e | 64 6f 6d 20 4e 6f 74 65 | */.Ran|dom Note|
|00002700| 73 0d 46 6f 72 20 69 6e | 66 6f 72 6d 61 74 69 6f |s.For in|formatio|
|00002710| 6e 20 6f 6e 20 62 75 67 | 20 66 69 78 65 73 20 69 |n on bug| fixes i|
|00002720| 6e 20 74 68 65 20 53 79 | 73 74 65 6d 20 53 6f 66 |n the Sy|stem Sof|
|00002730| 74 77 61 72 65 20 36 2e | 30 2e 35 20 72 65 6c 65 |tware 6.|0.5 rele|
|00002740| 61 73 65 20 6f 66 20 33 | 32 2d 42 69 74 20 51 75 |ase of 3|2-Bit Qu|
|00002750| 69 63 6b 44 72 61 77 20 | 28 76 65 72 73 69 6f 6e |ickDraw |(version|
|00002760| 20 31 2e 32 29 2c 20 70 | 6c 65 61 73 65 20 72 65 | 1.2), p|lease re|
|00002770| 66 65 72 20 74 6f 20 74 | 68 65 20 53 79 73 74 65 |fer to t|he Syste|
|00002780| 6d 20 53 6f 66 74 77 61 | 72 65 20 36 2e 30 2e 35 |m Softwa|re 6.0.5|
|00002790| 20 43 68 61 6e 67 65 20 | 48 69 73 74 6f 72 79 2c | Change |History,|
|000027a0| 20 77 68 69 63 68 20 69 | 73 20 61 76 61 69 6c 61 | which i|s availa|
|000027b0| 62 6c 65 20 6f 6e 20 74 | 68 65 20 44 65 76 65 6c |ble on t|he Devel|
|000027c0| 6f 70 65 72 20 43 44 20 | 53 65 72 69 65 73 2c 20 |oper CD |Series, |
|000027d0| 41 70 70 6c 65 4c 69 6e | 6b 20 69 6e 20 74 68 65 |AppleLin|k in the|
|000027e0| 20 44 65 76 65 6c 6f 70 | 65 72 20 53 65 72 76 69 | Develop|er Servi|
|000027f0| 63 65 73 20 42 75 6c 6c | 65 74 69 6e 20 42 6f 61 |ces Bull|etin Boa|
|00002800| 72 64 20 28 44 65 76 65 | 6c 6f 70 65 72 20 53 65 |rd (Deve|loper Se|
|00002810| 72 76 69 63 65 73 3a 20 | 4d 61 63 69 6e 74 6f 73 |rvices: |Macintos|
|00002820| 68 20 44 65 76 65 6c 6f | 70 65 72 20 54 65 63 68 |h Develo|per Tech|
|00002830| 6e 69 63 61 6c 20 53 75 | 70 70 6f 72 74 3a 20 53 |nical Su|pport: S|
|00002840| 79 73 74 65 6d 20 53 6f | 66 74 77 61 72 65 29 2c |ystem So|ftware),|
|00002850| 20 61 6e 64 20 74 68 65 | 20 41 70 70 6c 65 20 46 | and the| Apple F|
|00002860| 54 50 20 73 69 74 65 20 | 6f 6e 20 74 68 65 20 49 |TP site |on the I|
|00002870| 6e 74 65 72 6e 65 74 20 | 69 6e 20 74 68 65 20 7e |nternet |in the ~|
|00002880| 66 74 70 2f 70 75 62 2f | 64 74 73 2f 73 77 2e 6c |ftp/pub/|dts/sw.l|
|00002890| 69 63 65 6e 73 65 2e 0d | 4e 6f 74 65 20 74 68 61 |icense..|Note tha|
|000028a0| 74 20 74 68 65 20 64 69 | 73 70 61 74 63 68 69 6e |t the di|spatchin|
|000028b0| 67 20 6d 65 63 68 61 6e | 69 73 6d 20 66 6f 72 20 |g mechan|ism for |
|000028c0| 74 68 65 20 6e 65 77 20 | 5f 51 44 4f 66 66 73 63 |the new |_QDOffsc|
|000028d0| 72 65 65 6e 20 63 61 6c | 6c 73 20 69 73 20 73 6c |reen cal|ls is sl|
|000028e0| 69 67 68 74 6c 79 20 64 | 69 66 66 65 72 65 6e 74 |ightly d|ifferent|
|000028f0| 20 74 68 61 6e 20 70 72 | 65 76 69 6f 75 73 6c 79 | than pr|eviously|
|00002900| 20 64 6f 63 75 6d 65 6e | 74 65 64 3b 20 69 74 20 | documen|ted; it |
|00002910| 6e 6f 77 20 72 65 71 75 | 69 72 65 73 20 74 68 61 |now requ|ires tha|
|00002920| 74 20 74 68 65 20 68 69 | 67 68 20 77 6f 72 64 20 |t the hi|gh word |
|00002930| 70 61 73 73 65 64 20 69 | 6e 20 44 30 20 63 6f 6e |passed i|n D0 con|
|00002940| 74 61 69 6e 20 74 68 65 | 20 74 6f 74 61 6c 20 6c |tain the| total l|
|00002950| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 70 61 72 |ength of| the par|
|00002960| 61 6d 65 74 65 72 73 20 | 28 69 6e 20 62 79 74 65 |ameters |(in byte|
|00002970| 73 29 2e 20 20 54 68 65 | 20 72 65 61 73 6f 6e 20 |s). The| reason |
|00002980| 66 6f 72 20 74 68 69 73 | 20 63 68 61 6e 67 65 20 |for this| change |
|00002990| 69 73 20 74 68 61 74 20 | 69 66 20 74 68 65 20 63 |is that |if the c|
|000029a0| 61 6c 6c 20 69 73 20 6d | 61 64 65 20 69 6e 20 61 |all is m|ade in a|
|000029b0| 6e 20 65 61 72 6c 69 65 | 72 20 76 65 72 73 69 6f |n earlie|r versio|
|000029c0| 6e 20 6f 66 20 33 32 2d | 42 69 74 20 51 75 69 63 |n of 32-|Bit Quic|
|000029d0| 6b 44 72 61 77 2c 20 74 | 68 65 20 73 79 73 74 65 |kDraw, t|he syste|
|000029e0| 6d 20 63 61 6e 20 73 74 | 72 69 70 20 74 68 65 20 |m can st|rip the |
|000029f0| 70 61 72 61 6d 65 74 65 | 72 73 20 66 72 6f 6d 20 |paramete|rs from |
|00002a00| 74 68 65 20 73 74 61 63 | 6b 20 61 6e 64 20 72 65 |the stac|k and re|
|00002a10| 74 75 72 6e 20 51 44 45 | 72 72 6f 72 20 73 65 74 |turn QDE|rror set|
|00002a20| 20 74 6f 20 74 68 65 20 | 63 61 6c 6c 65 72 20 28 | to the |caller (|
|00002a30| 69 6e 73 74 65 61 64 20 | 6f 66 20 63 72 61 73 68 |instead |of crash|
|00002a40| 69 6e 67 29 2e 0d 46 75 | 72 74 68 65 72 20 52 65 |ing)..Fu|rther Re|
|00002a50| 66 65 72 65 6e 63 65 3a | 0d a5 09 49 6e 73 69 64 |ference:|...Insid|
|00002a60| 65 20 4d 61 63 69 6e 74 | 6f 73 68 2c 20 56 6f 6c |e Macint|osh, Vol|
|00002a70| 75 6d 65 20 56 2c 20 43 | 6f 6c 6f 72 20 51 75 69 |ume V, C|olor Qui|
|00002a80| 63 6b 44 72 61 77 0d a5 | 09 33 32 2d 42 69 74 20 |ckDraw..|.32-Bit |
|00002a90| 51 75 69 63 6b 44 72 61 | 77 20 52 65 6c 65 61 73 |QuickDra|w Releas|
|00002aa0| 65 20 4e 6f 74 65 73 20 | 28 61 76 61 69 6c 61 62 |e Notes |(availab|
|00002ab0| 6c 65 20 66 72 6f 6d 20 | 41 50 44 41 29 0d a5 09 |le from |APDA)...|
|00002ac0| 53 79 73 74 65 6d 20 53 | 6f 66 74 77 61 72 65 20 |System S|oftware |
|00002ad0| 36 2e 30 2e 35 20 43 68 | 61 6e 67 65 20 48 69 73 |6.0.5 Ch|ange His|
|00002ae0| 74 6f 72 79 0d a5 09 64 | 20 65 20 76 20 65 20 6c |tory...d| e v e l|
|00002af0| 20 6f 20 70 2c 20 49 73 | 73 75 65 20 49 0d 4e 75 | o p, Is|sue I.Nu|
|00002b00| 42 75 73 20 69 73 20 61 | 20 74 72 61 64 65 6d 61 |Bus is a| tradema|
|00002b10| 72 6b 20 6f 66 20 54 65 | 78 61 73 20 49 6e 73 74 |rk of Te|xas Inst|
|00002b20| 72 75 6d 65 6e 74 73 2e | 0d 51 44 20 32 20 2d 20 |ruments.|.QD 2 - |
|00002b30| 42 69 74 4d 61 70 54 6f | 52 65 67 69 6f 6e 20 3a |BitMapTo|Region :|
|00002b40| 20 53 6f 20 4d 61 6e 79 | 20 42 69 74 6d 61 70 73 | So Many| Bitmaps|
|00002b50| 2c 20 53 6f 20 4c 69 74 | 74 6c 65 20 54 69 6d 65 |, So Lit|tle Time|
|00002b60| 0d 51 75 69 63 6b 44 72 | 61 77 09 0d 52 65 76 69 |.QuickDr|aw..Revi|
|00002b70| 73 65 64 20 62 79 3a 09 | 52 69 63 68 20 43 6f 6c |sed by:.|Rich Col|
|00002b80| 6c 79 65 72 09 44 65 63 | 65 6d 62 65 72 20 31 39 |lyer.Dec|ember 19|
|00002b90| 38 39 0d 57 72 69 74 74 | 65 6e 20 62 79 3a 09 52 |89.Writt|en by:.R|
|00002ba0| 69 63 6b 20 42 6c 61 69 | 72 09 41 70 72 69 6c 20 |ick Blai|r.April |
|00002bb0| 31 39 38 38 0d 54 68 69 | 73 20 54 65 63 68 6e 69 |1988.Thi|s Techni|
|00002bc0| 63 61 6c 20 4e 6f 74 65 | 20 64 69 73 63 75 73 73 |cal Note| discuss|
|00002bd0| 65 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 20 42 |es the r|outine B|
|00002be0| 69 74 4d 61 70 54 6f 52 | 65 67 69 6f 6e 2c 20 77 |itMapToR|egion, w|
|00002bf0| 68 69 63 68 20 63 6f 6e | 76 65 72 74 73 20 61 20 |hich con|verts a |
|00002c00| 62 69 74 6d 61 70 20 74 | 6f 20 61 20 72 65 67 69 |bitmap t|o a regi|
|00002c10| 6f 6e 2c 20 61 6e 64 20 | 69 73 20 61 76 61 69 6c |on, and |is avail|
|00002c20| 61 62 6c 65 20 69 6e 20 | 74 68 65 20 33 32 2d 42 |able in |the 32-B|
|00002c30| 69 74 20 51 75 69 63 6b | 44 72 61 77 20 49 4e 49 |it Quick|Draw INI|
|00002c40| 54 20 61 6e 64 20 66 72 | 6f 6d 20 41 70 70 6c 65 |T and fr|om Apple|
|00002c50| 20 53 6f 66 74 77 61 72 | 65 20 4c 69 63 65 6e 73 | Softwar|e Licens|
|00002c60| 69 6e 67 2e 0d 43 68 61 | 6e 67 65 73 20 73 69 6e |ing..Cha|nges sin|
|00002c70| 63 65 20 4f 63 74 6f 62 | 65 72 20 31 39 38 39 3a |ce Octob|er 1989:|
|00002c80| 20 20 41 64 64 65 64 20 | 74 72 61 70 20 64 65 66 | Added |trap def|
|00002c90| 69 6e 69 74 69 6f 6e 73 | 20 66 6f 72 20 64 65 76 |initions| for dev|
|00002ca0| 65 6c 6f 70 65 72 73 20 | 75 73 69 6e 67 20 74 68 |elopers |using th|
|00002cb0| 65 20 33 32 2d 42 69 74 | 20 51 75 69 63 6b 44 72 |e 32-Bit| QuickDr|
|00002cc0| 61 77 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 74 68 |aw versi|on of th|
|00002cd0| 69 73 20 72 6f 75 74 69 | 6e 65 20 77 69 74 68 6f |is routi|ne witho|
|00002ce0| 75 74 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 4d |ut the c|orrect M|
|00002cf0| 50 57 20 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 2e |PW inclu|de file.|
|00002d00| 0d 54 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 72 |.The fol|lowing r|
|00002d10| 6f 75 74 69 6e 65 20 69 | 73 20 6e 6f 77 20 61 76 |outine i|s now av|
|00002d20| 61 69 6c 61 62 6c 65 20 | 74 6f 20 63 6f 6e 76 65 |ailable |to conve|
|00002d30| 72 74 20 61 20 62 69 74 | 6d 61 70 20 74 6f 20 61 |rt a bit|map to a|
|00002d40| 20 72 65 67 69 6f 6e 3a | 0d 46 55 4e 43 54 49 4f | region:|.FUNCTIO|
|00002d50| 4e 20 42 69 74 4d 61 70 | 54 6f 52 65 67 69 6f 6e |N BitMap|ToRegion|
|00002d60| 28 72 65 67 69 6f 6e 3a | 52 67 6e 48 61 6e 64 6c |(region:|RgnHandl|
|00002d70| 65 3b 20 62 4d 61 70 3a | 42 69 74 4d 61 70 29 3a |e; bMap:|BitMap):|
|00002d80| 20 4f 53 45 72 72 3b 0d | 69 6e 20 43 3a 0d 70 61 | OSErr;.|in C:.pa|
|00002d90| 73 63 61 6c 20 4f 53 45 | 72 72 20 42 69 74 4d 61 |scal OSE|rr BitMa|
|00002da0| 70 54 6f 52 65 67 69 6f | 6e 28 52 67 6e 48 61 6e |pToRegio|n(RgnHan|
|00002db0| 64 6c 65 20 72 65 67 69 | 6f 6e 2c 20 42 69 74 4d |dle regi|on, BitM|
|00002dc0| 61 70 20 62 4d 61 70 29 | 3b 0d 49 66 20 79 6f 75 |ap bMap)|;.If you|
|00002dd0| 20 61 72 65 20 75 73 69 | 6e 67 20 74 68 65 20 33 | are usi|ng the 3|
|00002de0| 32 2d 42 69 74 20 51 75 | 69 63 6b 44 72 61 77 20 |2-Bit Qu|ickDraw |
|00002df0| 76 65 72 73 69 6f 6e 20 | 6f 66 20 74 68 69 73 20 |version |of this |
|00002e00| 72 6f 75 74 69 6e 65 20 | 77 69 74 68 6f 75 74 20 |routine |without |
|00002e10| 74 68 65 20 63 6f 72 72 | 65 63 74 20 4d 50 57 20 |the corr|ect MPW |
|00002e20| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 2c 20 74 68 |include |file, th|
|00002e30| 65 6e 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 69 |en you n|eed to i|
|00002e40| 6e 63 6c 75 64 65 20 6f | 6e 65 20 6f 66 20 74 68 |nclude o|ne of th|
|00002e50| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 64 65 66 69 |e follow|ing defi|
|00002e60| 6e 69 74 69 6f 6e 73 3a | 0d 50 61 73 63 61 6c 0d |nitions:|.Pascal.|
|00002e70| 46 55 4e 43 54 49 4f 4e | 20 42 69 74 4d 61 70 54 |FUNCTION| BitMapT|
|00002e80| 6f 52 65 67 69 6f 6e 20 | 28 72 65 67 69 6f 6e 3a |oRegion |(region:|
|00002e90| 20 52 67 6e 48 61 6e 64 | 6c 65 3b 20 62 4d 61 70 | RgnHand|le; bMap|
|00002ea0| 3a 20 42 69 74 4d 61 70 | 29 3a 20 4f 53 45 72 72 |: BitMap|): OSErr|
|00002eb0| 3b 0d 20 20 20 20 20 20 | 20 20 20 49 4e 4c 49 4e |;. | INLIN|
|00002ec0| 45 20 24 41 38 44 37 3b | 0d 43 0d 70 61 73 63 61 |E $A8D7;|.C.pasca|
|00002ed0| 6c 20 4f 53 45 72 72 20 | 42 69 74 4d 61 70 54 6f |l OSErr |BitMapTo|
|00002ee0| 52 65 67 69 6f 6e 20 28 | 52 67 6e 48 61 6e 64 6c |Region (|RgnHandl|
|00002ef0| 65 20 72 65 67 69 6f 6e | 2c 20 63 6f 6e 73 74 20 |e region|, const |
|00002f00| 42 69 74 4d 61 70 20 2a | 62 4d 61 70 29 0d 20 20 |BitMap *|bMap). |
|00002f10| 20 20 20 20 20 20 20 20 | 20 20 20 3d 20 30 78 41 | | = 0xA|
|00002f20| 38 44 37 3b 0d 41 73 73 | 65 6d 62 6c 79 0d 5f 42 |8D7;.Ass|embly._B|
|00002f30| 69 74 4d 61 70 54 6f 52 | 65 67 69 6f 6e 20 20 20 |itMapToR|egion |
|00002f40| 20 20 20 20 20 4f 50 57 | 4f 52 44 20 20 20 20 20 | OPW|ORD |
|00002f50| 20 20 20 24 41 38 44 37 | 0d 54 68 65 20 72 65 67 | $A8D7|.The reg|
|00002f60| 69 6f 6e 20 77 69 6c 6c | 20 62 65 20 62 75 69 6c |ion will| be buil|
|00002f70| 74 20 73 6f 20 74 68 61 | 74 20 61 6c 6c 20 6f 6e |t so tha|t all on|
|00002f80| 65 20 62 69 74 73 20 69 | 6e 20 62 4d 61 70 20 61 |e bits i|n bMap a|
|00002f90| 72 65 20 69 6e 73 69 64 | 65 20 74 68 65 20 72 65 |re insid|e the re|
|00002fa0| 67 69 6f 6e 20 61 6e 64 | 20 61 6c 6c 20 7a 65 72 |gion and| all zer|
|00002fb0| 6f 20 62 69 74 73 20 61 | 72 65 20 6f 75 74 73 69 |o bits a|re outsi|
|00002fc0| 64 65 20 6f 66 20 69 74 | 2e 0d 41 73 20 77 69 74 |de of it|..As wit|
|00002fd0| 68 20 61 6c 6c 20 51 75 | 69 63 6b 44 72 61 77 20 |h all Qu|ickDraw |
|00002fe0| 63 61 6c 6c 73 20 77 68 | 69 63 68 20 63 68 61 6e |calls wh|ich chan|
|00002ff0| 67 65 20 61 20 72 65 67 | 69 6f 6e 2c 20 42 69 74 |ge a reg|ion, Bit|
|00003000| 4d 61 70 54 6f 52 65 67 | 69 6f 6e 20 72 65 71 75 |MapToReg|ion requ|
|00003010| 69 72 65 73 20 79 6f 75 | 20 74 6f 20 70 61 73 73 |ires you| to pass|
|00003020| 20 61 6e 20 65 78 69 73 | 74 69 6e 67 20 72 65 67 | an exis|ting reg|
|00003030| 69 6f 6e 20 28 6f 72 69 | 67 69 6e 61 6c 6c 79 20 |ion (ori|ginally |
|00003040| 63 72 65 61 74 65 64 20 | 62 79 20 5f 4e 65 77 52 |created |by _NewR|
|00003050| 67 6e 29 2e 20 20 49 66 | 20 74 68 65 20 72 65 67 |gn). If| the reg|
|00003060| 69 6f 6e 20 63 61 6e 6e | 6f 74 20 62 65 20 62 75 |ion cann|ot be bu|
|00003070| 69 6c 74 20 64 75 65 20 | 74 6f 20 61 6e 20 69 6e |ilt due |to an in|
|00003080| 73 75 66 66 69 63 69 65 | 6e 74 20 68 65 61 70 20 |sufficie|nt heap |
|00003090| 73 70 61 63 65 20 6f 72 | 20 61 20 73 69 7a 65 20 |space or| a size |
|000030a0| 67 72 65 61 74 65 72 20 | 74 68 61 6e 20 33 32 4b |greater |than 32K|
|000030b0| 2c 20 74 68 65 6e 20 74 | 68 65 20 72 6f 75 74 69 |, then t|he routi|
|000030c0| 6e 65 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 61 |ne will |return a|
|000030d0| 6e 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 65 72 |n approp|riate er|
|000030e0| 72 6f 72 20 63 6f 64 65 | 20 61 6e 64 20 74 68 65 |ror code| and the|
|000030f0| 20 72 65 67 69 6f 6e 20 | 77 69 6c 6c 20 62 65 20 | region |will be |
|00003100| 65 6d 70 74 79 2e 20 20 | 49 66 20 74 68 65 20 72 |empty. |If the r|
|00003110| 65 67 69 6f 6e 20 77 6f | 75 6c 64 20 68 61 76 65 |egion wo|uld have|
|00003120| 20 65 78 63 65 65 64 65 | 64 20 33 32 4b 2c 20 74 | exceede|d 32K, t|
|00003130| 68 65 20 65 72 72 6f 72 | 20 77 69 6c 6c 20 62 65 |he error| will be|
|00003140| 20 72 67 6e 54 6f 6f 42 | 69 67 45 72 72 20 28 2d | rgnTooB|igErr (-|
|00003150| 35 30 30 29 2e 0d 54 68 | 69 73 20 66 75 6e 63 74 |500)..Th|is funct|
|00003160| 69 6f 6e 20 69 73 20 75 | 73 65 66 75 6c 20 66 6f |ion is u|seful fo|
|00003170| 72 20 61 20 6e 75 6d 62 | 65 72 20 6f 66 20 73 69 |r a numb|er of si|
|00003180| 74 75 61 74 69 6f 6e 73 | 20 77 68 65 72 65 20 79 |tuations| where y|
|00003190| 6f 75 20 68 61 76 65 20 | 28 6f 72 20 63 61 6e 20 |ou have |(or can |
|000031a0| 70 72 6f 64 75 63 65 29 | 20 61 20 62 69 74 6d 61 |produce)| a bitma|
|000031b0| 70 20 72 65 70 72 65 73 | 65 6e 74 69 6e 67 20 61 |p repres|enting a|
|000031c0| 6e 20 61 72 65 61 2e 20 | 20 59 6f 75 20 63 61 6e |n area. | You can|
|000031d0| 20 75 73 65 20 5f 43 61 | 6c 63 4d 61 73 6b 20 74 | use _Ca|lcMask t|
|000031e0| 6f 20 70 72 6f 64 75 63 | 65 20 73 75 63 68 20 61 |o produc|e such a|
|000031f0| 20 62 69 74 6d 61 70 2e | 20 20 4f 6e 63 65 20 79 | bitmap.| Once y|
|00003200| 6f 75 20 68 61 76 65 20 | 61 20 72 65 67 69 6f 6e |ou have |a region|
|00003210| 2c 20 79 6f 75 20 63 61 | 6e 20 70 65 72 66 6f 72 |, you ca|n perfor|
|00003220| 6d 20 72 65 67 69 6f 6e | 20 6f 70 65 72 61 74 69 |m region| operati|
|00003230| 6f 6e 73 20 28 69 2e 65 | 2e 2c 20 5f 50 74 49 6e |ons (i.e|., _PtIn|
|00003240| 52 67 6e 2c 20 5f 55 6e | 69 6f 6e 52 67 6e 2c 20 |Rgn, _Un|ionRgn, |
|00003250| 6f 72 20 5f 49 6e 73 65 | 74 52 67 6e 29 20 6f 72 |or _Inse|tRgn) or|
|00003260| 20 63 61 6c 6c 20 5f 44 | 72 61 67 47 72 61 79 52 | call _D|ragGrayR|
|00003270| 67 6e 2c 20 66 6f 72 20 | 65 78 61 6d 70 6c 65 2e |gn, for |example.|
|00003280| 0d 54 68 69 73 20 63 61 | 6c 6c 20 69 73 20 70 61 |.This ca|ll is pa|
|00003290| 72 74 20 6f 66 20 74 68 | 65 20 33 32 2d 42 69 74 |rt of th|e 32-Bit|
|000032a0| 20 51 75 69 63 6b 44 72 | 61 77 20 49 4e 49 54 20 | QuickDr|aw INIT |
|000032b0| 28 24 41 38 44 37 29 2e | 20 20 49 66 20 79 6f 75 |($A8D7).| If you|
|000032c0| 20 64 6f 20 6e 6f 74 20 | 77 69 73 68 20 74 6f 20 | do not |wish to |
|000032d0| 64 65 70 65 6e 64 20 6f | 6e 20 33 32 2d 42 69 74 |depend o|n 32-Bit|
|000032e0| 20 51 75 69 63 6b 44 72 | 61 77 2c 20 74 68 65 6e | QuickDr|aw, then|
|000032f0| 20 79 6f 75 20 63 61 6e | 20 6f 62 74 61 69 6e 20 | you can| obtain |
|00003300| 61 20 76 65 72 73 69 6f | 6e 20 6f 66 20 42 69 74 |a versio|n of Bit|
|00003310| 4d 61 70 54 6f 52 65 67 | 69 6f 6e 20 69 6e 20 4d |MapToReg|ion in M|
|00003320| 50 57 20 6f 62 6a 65 63 | 74 20 66 6f 72 6d 61 74 |PW objec|t format|
|00003330| 20 77 68 69 63 68 20 63 | 61 6e 20 62 65 20 6c 69 | which c|an be li|
|00003340| 6e 6b 65 64 20 69 6e 74 | 6f 20 61 6e 20 4d 50 57 |nked int|o an MPW|
|00003350| 20 70 72 6f 67 72 61 6d | 2c 20 62 79 20 63 6f 6e | program|, by con|
|00003360| 74 61 63 74 69 6e 67 20 | 41 70 70 6c 65 20 53 6f |tacting |Apple So|
|00003370| 66 74 77 61 72 65 20 4c | 69 63 65 6e 73 69 6e 67 |ftware L|icensing|
|00003380| 3a 0d 09 09 09 41 70 70 | 6c 65 20 53 6f 66 74 77 |:....App|le Softw|
|00003390| 61 72 65 20 4c 69 63 65 | 6e 73 69 6e 67 0d 09 09 |are Lice|nsing...|
|000033a0| 09 41 70 70 6c 65 20 43 | 6f 6d 70 75 74 65 72 2c |.Apple C|omputer,|
|000033b0| 20 49 6e 63 2e 2c 0d 09 | 09 09 32 30 35 32 35 20 | Inc.,..|..20525 |
|000033c0| 4d 61 72 69 61 6e 69 20 | 41 76 65 6e 75 65 2c 20 |Mariani |Avenue, |
|000033d0| 4d 2f 53 20 33 38 2d 49 | 0d 09 09 09 43 75 70 65 |M/S 38-I|....Cupe|
|000033e0| 72 74 69 6e 6f 2c 20 43 | 41 2c 20 39 35 30 31 34 |rtino, C|A, 95014|
|000033f0| 0d 09 09 09 28 34 30 38 | 29 20 39 37 34 2d 34 36 |....(408|) 974-46|
|00003400| 36 37 0d 09 09 09 41 70 | 70 6c 65 4c 69 6e 6b 3a |67....Ap|pleLink:|
|00003410| 20 20 53 57 2e 4c 49 43 | 45 4e 53 45 0d 49 66 20 | SW.LIC|ENSE.If |
|00003420| 79 6f 75 20 6c 69 63 65 | 6e 73 65 64 20 74 68 65 |you lice|nsed the|
|00003430| 20 6f 6c 64 65 72 20 76 | 65 72 73 69 6f 6e 20 6f | older v|ersion o|
|00003440| 66 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2c 20 |f this r|outine, |
|00003450| 42 69 74 4d 61 70 52 67 | 6e 2c 20 63 6f 6e 74 61 |BitMapRg|n, conta|
|00003460| 63 74 20 53 6f 66 74 77 | 61 72 65 20 4c 69 63 65 |ct Softw|are Lice|
|00003470| 6e 73 69 6e 67 20 61 62 | 6f 75 74 20 72 65 63 65 |nsing ab|out rece|
|00003480| 69 76 69 6e 67 20 61 6e | 20 75 70 64 61 74 65 64 |iving an| updated|
|00003490| 20 76 65 72 73 69 6f 6e | 2e 20 20 57 65 20 72 65 | version|. We re|
|000034a0| 63 6f 6d 6d 65 6e 64 20 | 79 6f 75 20 75 70 64 61 |commend |you upda|
|000034b0| 74 65 20 79 6f 75 72 20 | 61 70 70 6c 69 63 61 74 |te your |applicat|
|000034c0| 69 6f 6e 20 74 6f 20 75 | 73 65 20 74 68 65 20 6e |ion to u|se the n|
|000034d0| 65 77 20 76 65 72 73 69 | 6f 6e 20 61 73 20 73 6f |ew versi|on as so|
|000034e0| 6f 6e 20 61 73 20 70 6f | 73 73 69 62 6c 65 2e 0d |on as po|ssible..|
|000034f0| 54 68 65 20 6e 65 77 20 | 76 65 72 73 69 6f 6e 20 |The new |version |
|00003500| 69 73 20 6e 6f 77 20 6e | 61 6d 65 64 20 42 69 74 |is now n|amed Bit|
|00003510| 4d 61 70 54 6f 52 65 67 | 69 6f 6e 20 74 6f 20 62 |MapToReg|ion to b|
|00003520| 65 20 63 6f 6e 73 69 73 | 74 65 6e 74 20 77 69 74 |e consis|tent wit|
|00003530| 68 20 74 68 65 20 76 65 | 72 73 69 6f 6e 20 69 6e |h the ve|rsion in|
|00003540| 20 33 32 2d 42 69 74 20 | 51 75 69 63 6b 44 72 61 | 32-Bit |QuickDra|
|00003550| 77 20 61 6e 64 20 74 68 | 65 20 4d 50 57 20 69 6e |w and th|e MPW in|
|00003560| 74 65 72 66 61 63 65 73 | 2e 20 20 49 6e 20 61 64 |terfaces|. In ad|
|00003570| 64 69 74 69 6f 6e 2c 20 | 42 69 74 4d 61 70 54 6f |dition, |BitMapTo|
|00003580| 52 65 67 69 6f 6e 20 6f | 66 66 65 72 73 20 6e 65 |Region o|ffers ne|
|00003590| 77 20 66 65 61 74 75 72 | 65 73 2e 20 20 59 6f 75 |w featur|es. You|
|000035a0| 20 63 61 6e 20 6e 6f 77 | 20 70 61 73 73 20 61 20 | can now| pass a |
|000035b0| 6f 6e 65 2d 62 69 74 20 | 70 69 78 65 6c 6d 61 70 |one-bit |pixelmap|
|000035c0| 20 77 68 69 63 68 20 68 | 61 73 20 62 65 65 6e 20 | which h|as been |
|000035d0| 63 6f 65 72 63 65 64 20 | 74 6f 20 61 20 62 69 74 |coerced |to a bit|
|000035e0| 6d 61 70 2e 20 20 49 66 | 20 79 6f 75 20 70 61 73 |map. If| you pas|
|000035f0| 73 20 61 20 70 69 78 65 | 6c 6d 61 70 20 77 68 69 |s a pixe|lmap whi|
|00003600| 63 68 20 69 73 20 74 6f | 6f 20 6c 61 72 67 65 2c |ch is to|o large,|
|00003610| 20 74 68 65 6e 20 79 6f | 75 20 77 69 6c 6c 20 67 | then yo|u will g|
|00003620| 65 74 20 61 20 70 69 78 | 6d 61 70 54 6f 6f 44 65 |et a pix|mapTooDe|
|00003630| 65 70 45 72 72 20 28 2d | 31 34 38 29 20 65 72 72 |epErr (-|148) err|
|00003640| 6f 72 2e 20 20 59 6f 75 | 20 63 61 6e 20 61 6c 73 |or. You| can als|
|00003650| 6f 20 70 61 73 73 20 74 | 68 65 20 70 6f 72 74 42 |o pass t|he portB|
|00003660| 69 74 73 20 6f 66 20 61 | 20 77 69 6e 64 6f 77 2c |its of a| window,|
|00003670| 20 6d 75 63 68 20 6c 69 | 6b 65 20 79 6f 75 20 77 | much li|ke you w|
|00003680| 6f 75 6c 64 20 64 6f 20 | 77 69 74 68 20 61 20 63 |ould do |with a c|
|00003690| 61 6c 6c 20 74 6f 20 5f | 43 6f 70 79 42 69 74 73 |all to _|CopyBits|
|000036a0| 2e 0d 54 68 65 72 65 20 | 69 73 20 61 20 70 6f 74 |..There |is a pot|
|000036b0| 65 6e 74 69 61 6c 20 70 | 72 6f 62 6c 65 6d 20 77 |ential p|roblem w|
|000036c0| 69 74 68 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ith this| routine|
|000036d0| 2c 20 73 69 6e 63 65 20 | 4d 50 57 20 33 2e 31 20 |, since |MPW 3.1 |
|000036e0| 69 6e 63 6c 75 64 65 20 | 66 69 6c 65 73 20 63 6f |include |files co|
|000036f0| 6e 74 61 69 6e 20 69 6e | 66 6f 72 6d 61 74 69 6f |ntain in|formatio|
|00003700| 6e 20 61 62 6f 75 74 20 | 33 32 2d 42 69 74 20 51 |n about |32-Bit Q|
|00003710| 75 69 63 6b 44 72 61 77 | 2e 20 20 49 66 20 79 6f |uickDraw|. If yo|
|00003720| 75 20 77 61 6e 74 20 42 | 69 74 4d 61 70 54 6f 52 |u want B|itMapToR|
|00003730| 65 67 69 6f 6e 20 74 6f | 20 62 65 20 61 76 61 69 |egion to| be avai|
|00003740| 6c 61 62 6c 65 20 6f 6e | 20 61 6c 6c 20 6d 61 63 |lable on| all mac|
|00003750| 68 69 6e 65 73 2c 20 74 | 68 65 6e 20 79 6f 75 20 |hines, t|hen you |
|00003760| 6d 75 73 74 20 75 73 65 | 20 74 68 65 20 6f 62 6a |must use| the obj|
|00003770| 65 63 74 20 66 69 6c 65 | 20 66 72 6f 6d 20 53 6f |ect file| from So|
|00003780| 66 74 77 61 72 65 20 4c | 69 63 65 6e 73 69 6e 67 |ftware L|icensing|
|00003790| 2e 20 20 54 68 65 20 70 | 72 6f 62 6c 65 6d 20 69 |. The p|roblem i|
|000037a0| 73 20 74 68 61 74 20 77 | 68 65 6e 20 79 6f 75 20 |s that w|hen you |
|000037b0| 63 6f 6d 70 69 6c 65 20 | 79 6f 75 72 20 61 70 70 |compile |your app|
|000037c0| 6c 69 63 61 74 69 6f 6e | 20 77 69 74 68 20 4d 50 |lication| with MP|
|000037d0| 57 20 33 2e 31 20 6f 72 | 20 6c 61 74 65 72 2c 20 |W 3.1 or| later, |
|000037e0| 74 68 65 20 33 32 2d 42 | 69 74 20 51 75 69 63 6b |the 32-B|it Quick|
|000037f0| 44 72 61 77 20 76 65 72 | 73 69 6f 6e 20 67 65 74 |Draw ver|sion get|
|00003800| 73 20 70 72 65 66 65 72 | 65 6e 63 65 20 6f 76 65 |s prefer|ence ove|
|00003810| 72 20 74 68 65 20 6f 62 | 6a 65 63 74 20 66 69 6c |r the ob|ject fil|
|00003820| 65 2e 20 20 59 6f 75 20 | 6d 75 73 74 20 63 6f 6d |e. You |must com|
|00003830| 6d 65 6e 74 20 6f 75 74 | 20 74 68 65 20 72 6f 75 |ment out| the rou|
|00003840| 74 69 6e 65 20 69 6e 20 | 74 68 65 20 69 6e 63 6c |tine in |the incl|
|00003850| 75 64 65 20 66 69 6c 65 | 73 20 69 66 20 79 6f 75 |ude file|s if you|
|00003860| 20 77 61 6e 74 20 74 6f | 20 75 73 65 20 74 68 65 | want to| use the|
|00003870| 20 6f 62 6a 65 63 74 20 | 66 69 6c 65 2e 20 20 49 | object |file. I|
|00003880| 66 20 79 6f 75 20 6f 6e | 6c 79 20 63 61 72 65 20 |f you on|ly care |
|00003890| 61 62 6f 75 74 20 75 73 | 69 6e 67 20 42 69 74 4d |about us|ing BitM|
|000038a0| 61 70 54 6f 52 65 67 69 | 6f 6e 20 6f 6e 20 6d 61 |apToRegi|on on ma|
|000038b0| 63 68 69 6e 65 73 20 72 | 75 6e 6e 69 6e 67 20 33 |chines r|unning 3|
|000038c0| 32 2d 42 69 74 20 51 75 | 69 63 6b 44 72 61 77 2c |2-Bit Qu|ickDraw,|
|000038d0| 20 74 68 65 6e 20 79 6f | 75 20 6e 65 65 64 20 6e | then yo|u need n|
|000038e0| 6f 74 20 64 6f 20 61 6e | 79 74 68 69 6e 67 2e 0d |ot do an|ything..|
|000038f0| 51 44 20 33 20 2d 20 43 | 6f 6c 6f 72 20 43 75 72 |QD 3 - C|olor Cur|
|00003900| 73 6f 72 20 43 75 72 73 | 69 6e 67 20 3a 20 41 20 |sor Curs|ing : A |
|00003910| 4c 65 61 64 69 6e 67 20 | 43 61 75 73 65 0d 51 75 |Leading |Cause.Qu|
|00003920| 69 63 6b 44 72 61 77 09 | 0d 52 65 76 69 73 65 64 |ickDraw.|.Revised|
|00003930| 20 62 79 3a 09 41 6c 61 | 6e 20 4d 69 6d 6d 73 09 | by:.Ala|n Mimms.|
|00003940| 4f 63 74 6f 62 65 72 20 | 31 39 38 39 0d 57 72 69 |October |1989.Wri|
|00003950| 74 74 65 6e 20 62 79 3a | 09 41 6c 61 6e 20 4d 69 |tten by:|.Alan Mi|
|00003960| 6d 6d 73 09 4a 75 6e 65 | 20 31 39 38 39 0d 57 6f |mms.June| 1989.Wo|
|00003970| 72 6b 69 6e 67 20 77 69 | 74 68 20 63 6f 6c 6f 72 |rking wi|th color|
|00003980| 20 63 75 72 73 6f 72 73 | 20 79 6f 75 20 63 72 65 | cursors| you cre|
|00003990| 61 74 65 20 66 72 6f 6d | 20 73 63 72 61 74 63 68 |ate from| scratch|
|000039a0| 20 63 61 6e 20 63 61 75 | 73 65 20 68 65 61 64 61 | can cau|se heada|
|000039b0| 63 68 65 73 2e 20 20 54 | 68 69 73 20 54 65 63 68 |ches. T|his Tech|
|000039c0| 6e 69 63 61 6c 20 4e 6f | 74 65 20 6d 61 79 20 68 |nical No|te may h|
|000039d0| 65 6c 70 20 61 20 62 69 | 74 2e 0d 43 68 61 6e 67 |elp a bi|t..Chang|
|000039e0| 65 73 20 73 69 6e 63 65 | 20 4a 75 6e 65 20 31 39 |es since| June 19|
|000039f0| 38 39 3a 20 20 41 64 64 | 65 64 20 61 20 77 61 72 |89: Add|ed a war|
|00003a00| 6e 69 6e 67 20 61 62 6f | 75 74 20 70 75 72 67 65 |ning abo|ut purge|
|00003a10| 61 62 6c 65 20 27 63 6c | 75 74 27 20 72 65 73 6f |able 'cl|ut' reso|
|00003a20| 75 72 63 65 73 2e 0d 49 | 66 20 79 6f 75 d5 72 65 |urces..I|f you.re|
|00003a30| 20 62 75 69 6c 64 69 6e | 67 20 61 6e 20 61 70 70 | buildin|g an app|
|00003a40| 6c 69 63 61 74 69 6f 6e | 20 74 68 61 74 20 63 72 |lication| that cr|
|00003a50| 65 61 74 65 73 20 63 6f | 6c 6f 72 20 63 75 72 73 |eates co|lor curs|
|00003a60| 6f 72 73 2c 20 79 6f 75 | 20 6d 61 79 20 65 6e 63 |ors, you| may enc|
|00003a70| 6f 75 6e 74 65 72 20 73 | 6f 6d 65 20 71 75 69 72 |ounter s|ome quir|
|00003a80| 6b 73 20 70 72 65 73 65 | 6e 74 20 69 6e 20 43 6f |ks prese|nt in Co|
|00003a90| 6c 6f 72 20 51 75 69 63 | 6b 44 72 61 77 20 74 68 |lor Quic|kDraw th|
|00003aa0| 61 74 20 6d 61 6e 69 66 | 65 73 74 20 74 68 65 6d |at manif|est them|
|00003ab0| 73 65 6c 76 65 73 20 69 | 6e 20 68 61 72 64 2d 74 |selves i|n hard-t|
|00003ac0| 6f 2d 75 6e 64 65 72 73 | 74 61 6e 64 20 77 61 79 |o-unders|tand way|
|00003ad0| 73 2e 0d 49 66 20 79 6f | 75 72 20 63 75 72 73 6f |s..If yo|ur curso|
|00003ae0| 72 20 69 73 2c 20 73 61 | 79 2c 20 31 35 20 70 69 |r is, sa|y, 15 pi|
|00003af0| 78 65 6c 73 20 74 61 6c | 6c 20 61 6e 64 20 39 20 |xels tal|l and 9 |
|00003b00| 70 69 78 65 6c 73 20 77 | 69 64 65 2c 20 79 6f 75 |pixels w|ide, you|
|00003b10| 20 6d 69 67 68 74 20 62 | 65 20 74 65 6d 70 74 65 | might b|e tempte|
|00003b20| 64 20 74 6f 20 75 73 65 | 20 74 68 65 73 65 20 76 |d to use| these v|
|00003b30| 61 6c 75 65 73 20 66 6f | 72 20 74 68 65 20 62 6f |alues fo|r the bo|
|00003b40| 75 6e 64 73 2e 62 6f 74 | 74 6f 6d 20 61 6e 64 20 |unds.bot|tom and |
|00003b50| 62 6f 75 6e 64 73 2e 72 | 69 67 68 74 2c 20 72 65 |bounds.r|ight, re|
|00003b60| 73 70 65 63 74 69 76 65 | 6c 79 2c 20 69 6e 20 79 |spective|ly, in y|
|00003b70| 6f 75 72 20 63 75 72 73 | 6f 72 d5 73 20 70 69 78 |our curs|or.s pix|
|00003b80| 65 6c 20 6d 61 70 2e 20 | 20 44 6f 6e d5 74 2e 20 |el map. | Don.t. |
|00003b90| 20 54 68 65 20 70 72 6f | 62 6c 65 6d 20 69 73 20 | The pro|blem is |
|00003ba0| 74 68 61 74 20 77 68 65 | 6e 20 74 68 65 20 63 75 |that whe|n the cu|
|00003bb0| 72 73 6f 72 d5 73 20 69 | 6d 61 67 65 20 6e 65 65 |rsor.s i|mage nee|
|00003bc0| 64 73 20 74 6f 20 62 65 | 20 65 78 70 61 6e 64 65 |ds to be| expande|
|00003bd0| 64 20 28 69 2e 65 2e 2c | 20 77 68 65 6e 20 79 6f |d (i.e.,| when yo|
|00003be0| 75 20 73 70 65 63 69 66 | 79 20 61 20 74 77 6f 20 |u specif|y a two |
|00003bf0| 62 69 74 2d 70 65 72 2d | 70 69 78 65 6c 20 63 75 |bit-per-|pixel cu|
|00003c00| 72 73 6f 72 20 61 6e 64 | 20 74 68 65 20 6d 6f 75 |rsor and| the mou|
|00003c10| 73 65 20 70 6f 69 6e 74 | 65 72 20 69 73 20 6f 6e |se point|er is on|
|00003c20| 20 61 6e 20 65 69 67 68 | 74 2d 62 69 74 20 73 63 | an eigh|t-bit sc|
|00003c30| 72 65 65 6e 29 20 74 68 | 65 20 5f 53 65 74 43 43 |reen) th|e _SetCC|
|00003c40| 75 72 73 6f 72 20 74 72 | 61 70 20 72 6f 75 6e 64 |ursor tr|ap round|
|00003c50| 73 20 74 68 65 20 77 69 | 64 74 68 20 6f 66 20 74 |s the wi|dth of t|
|00003c60| 68 65 20 70 69 78 65 6c | 20 6d 61 70 20 69 6e 20 |he pixel| map in |
|00003c70| 73 75 63 68 20 61 20 77 | 61 79 20 74 68 61 74 20 |such a w|ay that |
|00003c80| 79 6f 75 d5 6c 6c 20 67 | 65 74 20 6f 6e 6c 79 20 |you.ll g|et only |
|00003c90| 74 68 65 20 73 70 61 63 | 65 20 72 65 71 75 69 72 |the spac|e requir|
|00003ca0| 65 64 20 66 6f 72 20 61 | 20 31 35 20 62 79 20 38 |ed for a| 15 by 8|
|00003cb0| 20 70 69 78 65 6c 20 6d | 61 70 20 61 6c 6c 6f 63 | pixel m|ap alloc|
|00003cc0| 61 74 65 64 20 66 6f 72 | 20 74 68 65 20 65 78 70 |ated for| the exp|
|00003cd0| 61 6e 64 65 64 20 63 75 | 72 73 6f 72 20 64 61 74 |anded cu|rsor dat|
|00003ce0| 61 2e 20 20 57 68 65 6e | 20 74 68 65 20 63 75 72 |a. When| the cur|
|00003cf0| 73 6f 72 d5 73 20 69 6d | 61 67 65 20 69 73 20 65 |sor.s im|age is e|
|00003d00| 78 70 61 6e 64 65 64 20 | 69 6e 74 6f 20 74 68 69 |xpanded |into thi|
|00003d10| 73 20 74 6f 6f 2d 73 6d | 61 6c 6c 20 65 78 70 61 |s too-sm|all expa|
|00003d20| 6e 64 65 64 20 63 75 72 | 73 6f 72 20 64 61 74 61 |nded cur|sor data|
|00003d30| 20 68 61 6e 64 6c 65 20 | 61 73 20 61 20 31 35 20 | handle |as a 15 |
|00003d40| 62 79 20 39 20 70 69 78 | 65 6c 20 6d 61 70 2c 20 |by 9 pix|el map, |
|00003d50| 73 6f 6d 65 74 68 69 6e | 67 20 69 6e 20 79 6f 75 |somethin|g in you|
|00003d60| 72 20 68 65 61 70 20 77 | 69 6c 6c 20 67 65 74 20 |r heap w|ill get |
|00003d70| 6d 75 6e 63 68 65 64 2e | 0d 54 68 65 20 63 75 72 |munched.|.The cur|
|00003d80| 65 20 69 73 20 73 69 6d | 70 6c 65 2e 20 4d 61 6b |e is sim|ple. Mak|
|00003d90| 65 20 63 65 72 74 61 69 | 6e 20 74 68 61 74 20 79 |e certai|n that y|
|00003da0| 6f 75 20 61 6c 77 61 79 | 73 20 73 70 65 63 69 66 |ou alway|s specif|
|00003db0| 79 20 74 68 61 74 20 74 | 68 65 20 70 69 78 6d 61 |y that t|he pixma|
|00003dc0| 70 48 61 6e 64 6c 65 5e | 5e 2e 62 6f 75 6e 64 73 |pHandle^|^.bounds|
|00003dd0| 20 62 65 20 31 36 20 62 | 79 20 31 36 2e 20 20 54 | be 16 b|y 16. T|
|00003de0| 68 69 73 20 77 69 6c 6c | 20 63 61 75 73 65 20 5f |his will| cause _|
|00003df0| 53 65 74 43 43 75 72 73 | 6f 72 20 74 6f 20 70 72 |SetCCurs|or to pr|
|00003e00| 6f 70 65 72 6c 79 20 61 | 6c 6c 6f 63 61 74 65 20 |operly a|llocate |
|00003e10| 74 68 65 20 65 78 70 61 | 6e 64 65 64 20 64 61 74 |the expa|nded dat|
|00003e20| 61 20 61 72 65 61 2c 20 | 61 6e 64 20 61 6c 6c 20 |a area, |and all |
|00003e30| 77 69 6c 6c 20 62 65 20 | 77 65 6c 6c 20 69 6e 20 |will be |well in |
|00003e40| 74 68 65 20 6c 61 6e 64 | 2e 20 20 53 69 6e 63 65 |the land|. Since|
|00003e50| 20 74 68 65 20 61 6d 6f | 75 6e 74 20 6f 66 20 64 | the amo|unt of d|
|00003e60| 61 74 61 20 64 72 61 77 | 6e 20 66 6f 72 20 61 20 |ata draw|n for a |
|00003e70| 63 75 72 73 6f 72 20 69 | 73 20 73 70 65 63 69 66 |cursor i|s specif|
|00003e80| 69 65 64 20 62 79 20 74 | 68 65 20 63 75 72 73 6f |ied by t|he curso|
|00003e90| 72 d5 73 20 70 69 78 65 | 6c 20 76 61 6c 75 65 73 |r.s pixe|l values|
|00003ea0| 20 61 6e 64 20 27 63 6c | 75 74 27 20 72 65 73 6f | and 'cl|ut' reso|
|00003eb0| 75 72 63 65 2c 20 74 72 | 79 69 6e 67 20 74 6f 20 |urce, tr|ying to |
|00003ec0| 73 61 76 65 20 61 20 66 | 65 77 20 62 79 74 65 73 |save a f|ew bytes|
|00003ed0| 20 62 79 20 6d 61 6b 69 | 6e 67 20 74 68 65 20 62 | by maki|ng the b|
|00003ee0| 6f 75 6e 64 73 20 72 65 | 63 74 61 6e 67 6c 65 20 |ounds re|ctangle |
|00003ef0| 73 6d 61 6c 6c 65 72 20 | 74 68 61 6e 20 31 36 20 |smaller |than 16 |
|00003f00| 62 79 20 31 36 20 77 6f | 75 6c 64 6e d5 74 20 68 |by 16 wo|uldn.t h|
|00003f10| 61 76 65 20 62 65 65 6e | 20 76 65 72 79 20 68 65 |ave been| very he|
|00003f20| 6c 70 66 75 6c 20 61 6e | 79 77 61 79 2e 0d 41 6e |lpful an|yway..An|
|00003f30| 6f 74 68 65 72 20 70 6f | 74 65 6e 74 69 61 6c 20 |other po|tential |
|00003f40| 70 72 6f 62 6c 65 6d 20 | 69 73 20 77 69 74 68 20 |problem |is with |
|00003f50| 74 68 65 20 63 6f 6c 6f | 72 20 63 75 72 73 6f 72 |the colo|r cursor|
|00003f60| d5 73 20 63 6f 6c 6f 72 | 20 74 61 62 6c 65 2e 20 |.s color| table. |
|00003f70| 20 49 66 20 79 6f 75 20 | 6c 6f 61 64 20 74 68 65 | If you |load the|
|00003f80| 20 63 6f 6c 6f 72 20 74 | 61 62 6c 65 20 66 72 6f | color t|able fro|
|00003f90| 6d 20 61 20 27 63 6c 75 | 74 27 20 72 65 73 6f 75 |m a 'clu|t' resou|
|00003fa0| 72 63 65 20 75 73 69 6e | 67 20 5f 47 65 74 43 54 |rce usin|g _GetCT|
|00003fb0| 61 62 6c 65 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |able, yo|u should|
|00003fc0| 20 6d 61 6b 65 20 73 75 | 72 65 20 74 68 61 74 20 | make su|re that |
|00003fd0| 74 68 65 20 27 63 6c 75 | 74 27 20 69 73 20 6d 61 |the 'clu|t' is ma|
|00003fe0| 72 6b 65 64 20 6e 6f 6e | 2d 70 75 72 67 65 61 62 |rked non|-purgeab|
|00003ff0| 6c 65 20 77 68 69 6c 65 | 20 74 68 65 20 63 6f 6c |le while| the col|
|00004000| 6f 72 20 63 75 72 73 6f | 72 20 69 73 20 69 6e 20 |or curso|r is in |
|00004010| 75 73 65 2e 20 20 49 66 | 20 79 6f 75 20 64 6f 20 |use. If| you do |
|00004020| 6e 6f 74 20 74 61 6b 65 | 20 74 68 69 73 20 70 72 |not take| this pr|
|00004030| 65 63 61 75 74 69 6f 6e | 2c 20 62 6f 6d 62 73 20 |ecaution|, bombs |
|00004040| 77 69 6c 6c 20 6f 63 63 | 75 72 20 69 66 20 79 6f |will occ|ur if yo|
|00004050| 75 72 20 27 63 6c 75 74 | 27 20 67 65 74 73 20 70 |ur 'clut|' gets p|
|00004060| 75 72 67 65 64 20 61 74 | 20 69 6e 20 69 6e 6f 70 |urged at| in inop|
|00004070| 70 6f 72 74 75 6e 65 20 | 74 69 6d 65 2e 0d 51 44 |portune |time..QD|
|00004080| 20 34 20 2d 20 43 6f 6c | 6f 72 69 7a 69 6e 67 20 | 4 - Col|orizing |
|00004090| 57 69 74 68 20 43 6f 70 | 79 42 69 74 73 0d 51 75 |With Cop|yBits.Qu|
|000040a0| 69 63 6b 44 72 61 77 09 | 0d 52 65 76 69 73 65 64 |ickDraw.|.Revised|
|000040b0| 20 62 79 09 09 4d 61 72 | 63 68 20 31 39 38 38 0d | by..Mar|ch 1988.|
|000040c0| 57 72 69 74 74 65 6e 20 | 62 79 3a 09 43 68 72 69 |Written |by:.Chri|
|000040d0| 73 20 44 65 72 6f 73 73 | 69 09 4e 6f 76 65 6d 62 |s Deross|i.Novemb|
|000040e0| 65 72 20 31 39 38 37 0d | 49 6e 73 69 64 65 20 4d |er 1987.|Inside M|
|000040f0| 61 63 69 6e 74 6f 73 68 | 20 56 6f 6c 75 6d 65 20 |acintosh| Volume |
|00004100| 56 20 73 74 61 74 65 73 | 20 74 68 61 74 20 74 68 |V states| that th|
|00004110| 65 20 66 6f 72 65 67 72 | 6f 75 6e 64 20 61 6e 64 |e foregr|ound and|
|00004120| 20 62 61 63 6b 67 72 6f | 75 6e 64 20 63 6f 6c 6f | backgro|und colo|
|00004130| 72 73 20 61 72 65 20 61 | 70 70 6c 69 65 64 20 74 |rs are a|pplied t|
|00004140| 6f 20 61 6e 20 69 6d 61 | 67 65 20 64 75 72 69 6e |o an ima|ge durin|
|00004150| 67 20 61 20 43 6f 70 79 | 42 69 74 73 20 6f 72 20 |g a Copy|Bits or |
|00004160| 43 6f 70 79 4d 61 73 6b | 20 63 61 6c 6c 2e 20 41 |CopyMask| call. A|
|00004170| 63 63 69 64 65 6e 74 61 | 6c 20 75 73 65 20 6f 66 |ccidenta|l use of|
|00004180| 20 74 68 69 73 20 66 65 | 61 74 75 72 65 20 63 61 | this fe|ature ca|
|00004190| 6e 20 63 72 65 61 74 65 | 20 62 69 7a 61 72 72 65 |n create| bizarre|
|000041a0| 20 63 6f 6c 6f 72 69 6e | 67 20 65 66 66 65 63 74 | colorin|g effect|
|000041b0| 73 2e 20 54 68 69 73 20 | 6e 6f 74 65 20 65 78 70 |s. This |note exp|
|000041c0| 6c 61 69 6e 73 20 77 68 | 61 74 20 68 61 70 70 65 |lains wh|at happe|
|000041d0| 6e 73 2c 20 68 6f 77 20 | 74 6f 20 61 76 6f 69 64 |ns, how |to avoid|
|000041e0| 20 70 72 6f 62 6c 65 6d | 73 2c 20 61 6e 64 20 68 | problem|s, and h|
|000041f0| 6f 77 20 74 6f 20 75 73 | 65 20 69 74 2e 0d 57 68 |ow to us|e it..Wh|
|00004200| 61 74 20 48 61 70 70 65 | 6e 73 0d 43 6f 6c 6f 72 |at Happe|ns.Color|
|00004210| 20 51 75 69 63 6b 44 72 | 61 77 20 68 61 73 20 61 | QuickDr|aw has a|
|00004220| 20 66 65 61 74 75 72 65 | 20 74 68 61 74 20 77 69 | feature| that wi|
|00004230| 6c 6c 20 61 6c 6c 6f 77 | 20 79 6f 75 20 74 6f 20 |ll allow| you to |
|00004240| 63 6f 6e 76 65 72 74 20 | 61 20 6d 6f 6e 6f 63 68 |convert |a monoch|
|00004250| 72 6f 6d 65 20 69 6d 61 | 67 65 20 74 6f 20 61 20 |rome ima|ge to a |
|00004260| 63 6f 6c 6f 72 20 69 6d | 61 67 65 2e 20 44 75 72 |color im|age. Dur|
|00004270| 69 6e 67 20 61 20 43 6f | 70 79 42 69 74 73 20 6f |ing a Co|pyBits o|
|00004280| 72 20 43 6f 70 79 4d 61 | 73 6b 20 63 61 6c 6c 2c |r CopyMa|sk call,|
|00004290| 20 69 66 20 74 68 65 20 | 66 6f 72 65 67 72 6f 75 | if the |foregrou|
|000042a0| 6e 64 20 61 6e 64 20 62 | 61 63 6b 67 72 6f 75 6e |nd and b|ackgroun|
|000042b0| 64 20 63 6f 6c 6f 72 73 | 20 61 72 65 20 6e 6f 74 |d colors| are not|
|000042c0| 20 62 6c 61 63 6b 20 61 | 6e 64 20 77 68 69 74 65 | black a|nd white|
|000042d0| 2c 20 72 65 73 70 65 63 | 74 69 76 65 6c 79 2c 20 |, respec|tively, |
|000042e0| 43 6f 6c 6f 72 20 51 75 | 69 63 6b 44 72 61 77 20 |Color Qu|ickDraw |
|000042f0| 70 65 72 66 6f 72 6d 73 | 20 74 68 65 20 66 6f 6c |performs| the fol|
|00004300| 6c 6f 77 69 6e 67 20 6f | 70 65 72 61 74 69 6f 6e |lowing o|peration|
|00004310| 20 6f 6e 20 65 76 65 72 | 79 20 70 69 78 65 6c 20 | on ever|y pixel |
|00004320| 62 65 69 6e 67 20 63 6f | 70 69 65 64 3a 0d 09 4e |being co|pied:..N|
|00004330| 4f 54 45 3a 20 63 6f 6c | 6f 72 20 74 61 62 6c 65 |OTE: col|or table|
|00004340| 20 69 6e 64 65 78 20 3d | 20 70 69 78 65 6c 20 76 | index =| pixel v|
|00004350| 61 6c 75 65 0d 09 73 20 | 3d 20 63 6f 6c 6f 72 20 |alue..s |= color |
|00004360| 74 61 62 6c 65 20 69 6e | 64 65 78 20 6f 66 20 73 |table in|dex of s|
|00004370| 6f 75 72 63 65 20 70 69 | 78 65 6c 0d 09 66 67 20 |ource pi|xel..fg |
|00004380| 3d 20 63 6f 6c 6f 72 20 | 74 61 62 6c 65 20 69 6e |= color |table in|
|00004390| 64 65 78 20 6f 66 20 66 | 6f 72 65 67 72 6f 75 6e |dex of f|oregroun|
|000043a0| 64 20 63 6f 6c 6f 72 0d | 09 62 67 20 3d 20 63 6f |d color.|.bg = co|
|000043b0| 6c 6f 72 20 74 61 62 6c | 65 20 69 6e 64 65 78 20 |lor tabl|e index |
|000043c0| 6f 66 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 63 6f |of backg|round co|
|000043d0| 6c 6f 72 0d 09 43 6f 6c | 6f 72 65 64 50 69 78 65 |lor..Col|oredPixe|
|000043e0| 6c 56 61 6c 75 65 20 3d | 20 28 4e 4f 54 28 73 29 |lValue =| (NOT(s)|
|000043f0| 20 41 4e 44 20 62 67 29 | 20 4f 52 20 28 73 20 41 | AND bg)| OR (s A|
|00004400| 4e 44 20 66 67 29 0d 49 | 66 20 79 6f 75 72 20 73 |ND fg).I|f your s|
|00004410| 6f 75 72 63 65 20 69 6d | 61 67 65 20 63 6f 6e 74 |ource im|age cont|
|00004420| 61 69 6e 73 20 6f 6e 6c | 79 20 62 6c 61 63 6b 20 |ains onl|y black |
|00004430| 61 6e 64 20 77 68 69 74 | 65 20 70 69 78 65 6c 73 |and whit|e pixels|
|00004440| 2c 20 74 68 65 6e 20 61 | 6c 6c 20 62 6c 61 63 6b |, then a|ll black|
|00004450| 20 70 69 78 65 6c 73 20 | 77 6f 75 6c 64 20 62 65 | pixels |would be|
|00004460| 63 6f 6d 65 20 74 68 65 | 20 66 6f 72 65 67 72 6f |come the| foregro|
|00004470| 75 6e 64 20 63 6f 6c 6f | 72 20 61 6e 64 20 61 6c |und colo|r and al|
|00004480| 6c 20 77 68 69 74 65 20 | 70 69 78 65 6c 73 20 77 |l white |pixels w|
|00004490| 6f 75 6c 64 20 62 65 63 | 6f 6d 65 20 74 68 65 20 |ould bec|ome the |
|000044a0| 62 61 63 6b 67 72 6f 75 | 6e 64 20 63 6f 6c 6f 72 |backgrou|nd color|
|000044b0| 2e 20 54 68 69 73 20 69 | 73 20 62 65 63 61 75 73 |. This i|s becaus|
|000044c0| 65 20 74 68 65 20 63 6f | 6c 6f 72 20 74 61 62 6c |e the co|lor tabl|
|000044d0| 65 20 69 6e 64 65 78 20 | 66 6f 72 20 77 68 69 74 |e index |for whit|
|000044e0| 65 20 69 73 20 61 6c 6c | 20 7a 65 72 6f 73 20 61 |e is all| zeros a|
|000044f0| 6e 64 20 74 68 65 20 63 | 6f 6c 6f 72 20 74 61 62 |nd the c|olor tab|
|00004500| 6c 65 20 69 6e 64 65 78 | 20 66 6f 72 20 62 6c 61 |le index| for bla|
|00004510| 63 6b 20 69 73 20 61 6c | 6c 20 6f 6e 65 73 2e 0d |ck is al|l ones..|
|00004520| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 73 75 70 |For exam|ple, sup|
|00004530| 70 6f 73 65 20 79 6f 75 | 72 20 73 6f 75 72 63 65 |pose you|r source|
|00004540| 20 69 6d 61 67 65 20 77 | 61 73 20 61 20 34 2d 62 | image w|as a 4-b|
|00004550| 69 74 20 64 65 65 70 20 | 63 6f 6c 6f 72 20 50 69 |it deep |color Pi|
|00004560| 78 4d 61 70 2e 20 54 68 | 65 6e 20 74 68 65 20 63 |xMap. Th|en the c|
|00004570| 6f 6c 6f 72 20 74 61 62 | 6c 65 20 69 6e 64 65 78 |olor tab|le index|
|00004580| 20 66 6f 72 20 77 68 69 | 74 65 20 28 69 6e 20 62 | for whi|te (in b|
|00004590| 69 6e 61 72 79 29 20 69 | 73 20 30 30 30 30 20 61 |inary) i|s 0000 a|
|000045a0| 6e 64 20 74 68 65 20 69 | 6e 64 65 78 20 66 6f 72 |nd the i|ndex for|
|000045b0| 20 62 6c 61 63 6b 20 69 | 73 20 31 31 31 31 2e 20 | black i|s 1111. |
|000045c0| 41 6e 64 20 6c 65 74 d5 | 73 20 73 75 70 70 6f 73 |And let.|s suppos|
|000045d0| 65 20 74 68 61 74 20 79 | 6f 75 72 20 66 6f 72 65 |e that y|our fore|
|000045e0| 67 72 6f 75 6e 64 20 63 | 6f 6c 6f 72 20 69 73 20 |ground c|olor is |
|000045f0| 67 72 65 65 6e 20 77 69 | 74 68 20 61 6e 20 69 6e |green wi|th an in|
|00004600| 64 65 78 20 6f 66 20 31 | 31 30 31 20 77 68 69 6c |dex of 1|101 whil|
|00004610| 65 20 79 6f 75 72 20 62 | 61 63 6b 67 72 6f 75 6e |e your b|ackgroun|
|00004620| 64 20 63 6f 6c 6f 72 20 | 69 73 20 72 65 64 20 77 |d color |is red w|
|00004630| 69 74 68 20 61 6e 20 69 | 6e 64 65 78 20 6f 66 20 |ith an i|ndex of |
|00004640| 30 30 31 31 2e 20 54 68 | 65 6e 20 66 6f 72 20 74 |0011. Th|en for t|
|00004650| 68 65 20 62 6c 61 63 6b | 20 70 69 78 65 6c 73 2c |he black| pixels,|
|00004660| 20 74 68 65 20 61 62 6f | 76 65 20 70 72 6f 63 65 | the abo|ve proce|
|00004670| 64 75 72 65 20 70 72 6f | 64 75 63 65 73 3a 0d 09 |dure pro|duces:..|
|00004680| 43 6f 6c 6f 72 65 64 50 | 69 78 65 6c 56 61 6c 75 |ColoredP|ixelValu|
|00004690| 65 20 3d 20 28 4e 4f 54 | 28 31 31 31 31 29 20 41 |e = (NOT|(1111) A|
|000046a0| 4e 44 20 30 30 31 31 29 | 20 4f 52 20 28 31 31 31 |ND 0011)| OR (111|
|000046b0| 31 20 41 4e 44 20 31 31 | 30 31 29 0d 09 20 20 20 |1 AND 11|01).. |
|000046c0| 20 20 31 31 30 31 20 20 | 20 20 20 20 20 20 20 3d | 1101 | =|
|000046d0| 20 28 20 20 30 30 30 30 | 20 20 20 20 41 4e 44 20 | ( 0000| AND |
|000046e0| 30 30 31 31 29 20 4f 52 | 20 28 31 31 31 31 20 41 |0011) OR| (1111 A|
|000046f0| 4e 44 20 31 31 30 31 29 | 0d 41 6e 64 20 74 68 65 |ND 1101)|.And the|
|00004700| 20 6f 70 65 72 61 74 69 | 6f 6e 20 6f 6e 20 74 68 | operati|on on th|
|00004710| 65 20 77 68 69 74 65 20 | 70 69 78 65 6c 73 20 79 |e white |pixels y|
|00004720| 69 65 6c 64 73 3a 0d 09 | 43 6f 6c 6f 72 65 64 50 |ields:..|ColoredP|
|00004730| 69 78 65 6c 56 61 6c 75 | 65 20 3d 20 28 4e 4f 54 |ixelValu|e = (NOT|
|00004740| 28 30 30 30 30 29 20 41 | 4e 44 20 30 30 31 31 29 |(0000) A|ND 0011)|
|00004750| 20 4f 52 20 28 30 30 30 | 30 20 41 4e 44 20 31 31 | OR (000|0 AND 11|
|00004760| 30 31 29 0d 09 20 20 20 | 20 20 30 30 31 31 20 20 |01).. | 0011 |
|00004770| 20 20 20 20 20 20 20 3d | 20 28 20 20 31 31 31 31 | =| ( 1111|
|00004780| 20 20 20 20 41 4e 44 20 | 30 30 31 31 29 20 4f 52 | AND |0011) OR|
|00004790| 20 28 30 30 30 30 20 41 | 4e 44 20 31 31 30 31 29 | (0000 A|ND 1101)|
|000047a0| 0d 50 6f 73 73 69 62 6c | 65 20 50 72 6f 62 6c 65 |.Possibl|e Proble|
|000047b0| 6d 73 0d 54 68 69 73 20 | 63 6f 6c 6f 72 69 7a 69 |ms.This |colorizi|
|000047c0| 6e 67 20 77 69 6c 6c 20 | 6f 6e 6c 79 20 77 6f 72 |ng will |only wor|
|000047d0| 6b 20 6f 6e 20 32 2d 63 | 6f 6c 6f 72 20 28 69 2e |k on 2-c|olor (i.|
|000047e0| 65 2e 20 62 6c 61 63 6b | 20 61 6e 64 20 77 68 69 |e. black| and whi|
|000047f0| 74 65 29 20 69 6d 61 67 | 65 73 2c 20 61 6e 64 20 |te) imag|es, and |
|00004800| 74 68 65 6e 20 6f 6e 6c | 79 20 69 66 20 74 68 6f |then onl|y if tho|
|00004810| 73 65 20 63 6f 6c 6f 72 | 73 20 6f 63 63 75 70 79 |se color|s occupy|
|00004820| 20 74 68 65 20 66 69 72 | 73 74 20 61 6e 64 20 6c | the fir|st and l|
|00004830| 61 73 74 20 65 6e 74 72 | 69 65 73 20 69 6e 20 74 |ast entr|ies in t|
|00004840| 68 65 20 63 6f 6c 6f 72 | 20 74 61 62 6c 65 2e 20 |he color| table. |
|00004850| 54 72 79 69 6e 67 20 74 | 6f 20 63 6f 6c 6f 72 69 |Trying t|o colori|
|00004860| 7a 65 20 63 6f 6c 6f 72 | 73 20 74 68 61 74 20 61 |ze color|s that a|
|00004870| 72 65 20 6e 6f 74 20 74 | 68 65 20 66 69 72 73 74 |re not t|he first|
|00004880| 20 61 6e 64 20 6c 61 73 | 74 20 63 6f 6c 6f 72 20 | and las|t color |
|00004890| 74 61 62 6c 65 20 65 6e | 74 72 69 65 73 20 77 69 |table en|tries wi|
|000048a0| 6c 6c 20 79 69 65 6c 64 | 20 75 6e 65 78 70 65 63 |ll yield| unexpec|
|000048b0| 74 65 64 20 72 65 73 75 | 6c 74 73 2e 0d 54 68 69 |ted resu|lts..Thi|
|000048c0| 73 20 69 73 20 6d 61 69 | 6e 6c 79 20 64 75 65 20 |s is mai|nly due |
|000048d0| 74 6f 20 74 68 65 20 66 | 61 63 74 20 74 68 61 74 |to the f|act that|
|000048e0| 20 74 68 65 20 63 6f 6c | 6f 72 69 7a 69 6e 67 20 | the col|orizing |
|000048f0| 61 6c 67 6f 72 69 74 68 | 6d 20 75 73 65 73 20 61 |algorith|m uses a|
|00004900| 20 70 69 78 65 6c d5 73 | 20 63 6f 6c 6f 72 20 74 | pixel.s| color t|
|00004910| 61 62 6c 65 20 69 6e 64 | 65 78 20 76 61 6c 75 65 |able ind|ex value|
|00004920| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 69 74 73 | rather |than its|
|00004930| 20 61 63 74 75 61 6c 20 | 52 47 42 20 63 6f 6c 6f | actual |RGB colo|
|00004940| 72 2e 20 54 6f 20 69 6c | 6c 75 73 74 72 61 74 65 |r. To il|lustrate|
|00004950| 20 74 68 69 73 2c 20 6c | 65 74 d5 73 20 61 73 73 | this, l|et.s ass|
|00004960| 75 6d 65 20 74 68 61 74 | 20 66 6f 72 65 67 72 6f |ume that| foregro|
|00004970| 75 6e 64 20 61 6e 64 20 | 62 61 63 6b 67 72 6f 75 |und and |backgrou|
|00004980| 6e 64 20 63 6f 6c 6f 72 | 73 20 61 72 65 20 61 73 |nd color|s are as|
|00004990| 20 61 62 6f 76 65 2c 20 | 61 6e 64 20 79 6f 75 72 | above, |and your|
|000049a0| 20 69 6d 61 67 65 20 63 | 6f 6e 74 61 69 6e 73 20 | image c|ontains |
|000049b0| 79 65 6c 6c 6f 77 20 77 | 69 74 68 20 61 20 63 6f |yellow w|ith a co|
|000049c0| 6c 6f 72 20 74 61 62 6c | 65 20 69 6e 64 65 78 20 |lor tabl|e index |
|000049d0| 6f 66 20 31 30 30 30 2e | 20 54 68 65 20 63 6f 6c |of 1000.| The col|
|000049e0| 6f 72 69 7a 69 6e 67 20 | 6f 70 65 72 61 74 69 6f |orizing |operatio|
|000049f0| 6e 20 77 6f 75 6c 64 20 | 67 69 76 65 3a 0d 09 43 |n would |give:..C|
|00004a00| 6f 6c 6f 72 65 64 50 69 | 78 65 6c 56 61 6c 75 65 |oloredPi|xelValue|
|00004a10| 20 3d 20 28 4e 4f 54 28 | 31 30 30 30 29 20 41 4e | = (NOT(|1000) AN|
|00004a20| 44 20 30 30 31 31 29 20 | 4f 52 20 28 31 30 30 30 |D 0011) |OR (1000|
|00004a30| 20 41 4e 44 20 31 31 30 | 31 29 0d 09 20 20 20 20 | AND 110|1).. |
|00004a40| 20 31 30 31 31 20 20 20 | 20 20 20 20 20 20 3d 20 | 1011 | = |
|00004a50| 28 20 20 30 31 31 31 20 | 20 20 20 41 4e 44 20 30 |( 0111 | AND 0|
|00004a60| 30 31 31 29 20 4f 52 20 | 28 31 30 30 30 20 41 4e |011) OR |(1000 AN|
|00004a70| 44 20 31 31 30 31 29 0d | 53 69 6e 63 65 20 74 68 |D 1101).|Since th|
|00004a80| 65 20 63 6f 6c 6f 72 20 | 74 61 62 6c 65 20 6d 61 |e color |table ma|
|00004a90| 79 20 68 61 76 65 20 61 | 6e 79 20 52 47 42 20 63 |y have a|ny RGB c|
|00004aa0| 6f 6c 6f 72 20 61 74 20 | 74 68 65 20 72 65 73 75 |olor at |the resu|
|00004ab0| 6c 74 69 6e 67 20 69 6e | 64 65 78 20 70 6f 73 69 |lting in|dex posi|
|00004ac0| 74 69 6f 6e 2c 20 74 68 | 65 20 66 69 6e 61 6c 20 |tion, th|e final |
|00004ad0| 63 6f 6c 6f 72 20 6d 61 | 79 20 6e 6f 74 20 65 76 |color ma|y not ev|
|00004ae0| 65 6e 20 62 65 20 63 6c | 6f 73 65 20 74 6f 20 74 |en be cl|ose to t|
|00004af0| 68 65 20 73 6f 75 72 63 | 65 2c 20 66 6f 72 65 67 |he sourc|e, foreg|
|00004b00| 72 6f 75 6e 64 2c 20 6f | 72 20 62 61 63 6b 67 72 |round, o|r backgr|
|00004b10| 6f 75 6e 64 20 63 6f 6c | 6f 72 73 2e 0d 53 69 6d |ound col|ors..Sim|
|00004b20| 69 6c 61 72 20 74 68 69 | 6e 67 73 20 6f 63 63 75 |ilar thi|ngs occu|
|00004b30| 72 20 69 66 20 79 6f 75 | 20 61 72 65 20 74 72 79 |r if you| are try|
|00004b40| 69 6e 67 20 74 6f 20 63 | 6f 6c 6f 72 69 7a 65 20 |ing to c|olorize |
|00004b50| 61 20 62 6c 61 63 6b 20 | 61 6e 64 20 77 68 69 74 |a black |and whit|
|00004b60| 65 20 69 6d 61 67 65 20 | 77 68 65 6e 20 77 68 69 |e image |when whi|
|00004b70| 74 65 20 61 6e 64 20 62 | 6c 61 63 6b 20 64 6f 20 |te and b|lack do |
|00004b80| 6e 6f 74 20 6f 63 63 75 | 70 79 20 74 68 65 20 66 |not occu|py the f|
|00004b90| 69 72 73 74 20 61 6e 64 | 20 6c 61 73 74 20 70 6f |irst and| last po|
|00004ba0| 73 69 74 69 6f 6e 73 20 | 69 6e 20 74 68 65 20 63 |sitions |in the c|
|00004bb0| 6f 6c 6f 72 20 74 61 62 | 6c 65 2e 0d 54 68 65 20 |olor tab|le..The |
|00004bc0| 62 6f 74 74 6f 6d 20 6c | 69 6e 65 20 72 75 6c 65 |bottom l|ine rule|
|00004bd0| 73 20 66 6f 72 20 43 6f | 70 79 42 69 74 73 69 6e |s for Co|pyBitsin|
|00004be0| 67 20 69 6e 20 61 20 63 | 6f 6c 6f 72 20 65 6e 76 |g in a c|olor env|
|00004bf0| 69 72 6f 6e 6d 65 6e 74 | 20 61 72 65 20 74 68 65 |ironment| are the|
|00004c00| 73 65 3a 0d a5 09 54 68 | 6f 75 20 73 68 61 6c 74 |se:...Th|ou shalt|
|00004c10| 20 73 65 74 20 74 68 79 | 20 62 61 63 6b 67 72 6f | set thy| backgro|
|00004c20| 75 6e 64 20 63 6f 6c 6f | 72 20 74 6f 20 77 68 69 |und colo|r to whi|
|00004c30| 74 65 20 61 6e 64 20 74 | 68 79 20 66 6f 72 65 67 |te and t|hy foreg|
|00004c40| 72 6f 75 6e 64 20 63 6f | 6c 6f 72 20 74 6f 20 62 |round co|lor to b|
|00004c50| 6c 61 63 6b 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |lack bef|ore call|
|00004c60| 69 6e 67 20 43 6f 70 79 | 42 69 74 73 20 6f 72 20 |ing Copy|Bits or |
|00004c70| 43 6f 70 79 4d 61 73 6b | 2c 20 75 6e 6c 65 73 73 |CopyMask|, unless|
|00004c80| 20 74 68 6f 75 20 61 72 | 74 20 63 6f 6c 6f 72 69 | thou ar|t colori|
|00004c90| 6e 67 20 61 20 6d 6f 6e | 6f 63 68 72 6f 6d 65 20 |ng a mon|ochrome |
|00004ca0| 69 6d 61 67 65 2e 0d a5 | 09 54 68 6f 75 20 73 68 |image...|.Thou sh|
|00004cb0| 61 6c 74 2c 20 77 68 65 | 6e 20 63 6f 6c 6f 72 69 |alt, whe|n colori|
|00004cc0| 7a 69 6e 67 2c 20 6d 61 | 6b 65 20 73 75 72 65 20 |zing, ma|ke sure |
|00004cd0| 74 68 61 74 20 74 68 65 | 20 66 69 72 73 74 20 63 |that the| first c|
|00004ce0| 6f 6c 6f 72 20 74 61 62 | 6c 65 20 65 6e 74 72 79 |olor tab|le entry|
|00004cf0| 20 69 73 20 77 68 69 74 | 65 20 61 6e 64 20 74 68 | is whit|e and th|
|00004d00| 65 20 6c 61 73 74 20 09 | 63 6f 6c 6f 72 20 74 61 |e last .|color ta|
|00004d10| 62 6c 65 20 65 6e 74 72 | 79 20 69 73 20 62 6c 61 |ble entr|y is bla|
|00004d20| 63 6b 2e 0d 54 68 65 20 | 73 65 63 6f 6e 64 20 72 |ck..The |second r|
|00004d30| 75 6c 65 20 69 73 20 65 | 61 73 79 20 74 6f 20 66 |ule is e|asy to f|
|00004d40| 6f 6c 6c 6f 77 20 62 65 | 63 61 75 73 65 20 74 68 |ollow be|cause th|
|00004d50| 65 20 64 65 66 61 75 6c | 74 20 63 6f 6c 6f 72 20 |e defaul|t color |
|00004d60| 74 61 62 6c 65 73 20 61 | 72 65 20 63 6f 6e 73 74 |tables a|re const|
|00004d70| 72 75 63 74 65 64 20 70 | 72 6f 70 65 72 6c 79 2c |ructed p|roperly,|
|00004d80| 20 61 6e 64 20 69 66 20 | 79 6f 75 20 61 72 65 20 | and if |you are |
|00004d90| 75 73 69 6e 67 20 74 68 | 65 20 50 61 6c 65 74 74 |using th|e Palett|
|00004da0| 65 20 4d 61 6e 61 67 65 | 72 20 28 61 6e 64 20 79 |e Manage|r (and y|
|00004db0| 6f 75 20 61 72 65 2c 20 | 72 69 67 68 74 3f 29 20 |ou are, |right?) |
|00004dc0| 74 68 65 6e 20 69 74 20 | 77 69 6c 6c 20 6d 61 6b |then it |will mak|
|00004dd0| 65 20 73 75 72 65 20 74 | 68 61 74 20 74 68 65 20 |e sure t|hat the |
|00004de0| 63 6f 6c 6f 72 20 74 61 | 62 6c 65 73 20 6f 62 65 |color ta|bles obe|
|00004df0| 79 20 74 68 69 73 20 72 | 75 6c 65 2e 0d 48 6f 77 |y this r|ule..How|
|00004e00| 20 54 6f 20 43 6f 6c 6f | 72 69 7a 65 d1 41 6e 20 | To Colo|rize.An |
|00004e10| 45 78 61 6d 70 6c 65 0d | 54 68 69 73 20 63 6f 64 |Example.|This cod|
|00004e20| 65 20 66 72 61 67 6d 65 | 6e 74 20 73 68 6f 77 73 |e fragme|nt shows|
|00004e30| 20 68 6f 77 20 74 6f 20 | 69 6d 70 6c 65 6d 65 6e | how to |implemen|
|00004e40| 74 20 61 20 63 6f 6c 6f | 72 20 66 69 6c 6c 2c 20 |t a colo|r fill, |
|00004e50| 6c 69 6b 65 20 74 68 65 | 20 70 61 69 6e 74 20 62 |like the| paint b|
|00004e60| 75 63 6b 65 74 20 69 6e | 20 4d 61 63 50 61 69 6e |ucket in| MacPain|
|00004e70| 74 2e 20 49 74 20 72 65 | 6c 69 65 73 20 6f 6e 20 |t. It re|lies on |
|00004e80| 74 68 72 65 65 20 6d 61 | 69 6e 20 74 68 69 6e 67 |three ma|in thing|
|00004e90| 73 3a 20 53 65 65 64 43 | 46 69 6c 6c 20 66 6f 72 |s: SeedC|Fill for|
|00004ea0| 20 63 61 6c 63 75 6c 61 | 74 69 6e 67 20 74 68 65 | calcula|ting the|
|00004eb0| 20 66 69 6c 6c 20 61 72 | 65 61 2c 20 43 6f 70 79 | fill ar|ea, Copy|
|00004ec0| 4d 61 73 6b 20 66 6f 72 | 20 61 63 74 75 61 6c 6c |Mask for| actuall|
|00004ed0| 79 20 63 68 61 6e 67 69 | 6e 67 20 74 68 65 20 62 |y changi|ng the b|
|00004ee0| 69 74 73 2c 20 61 6e 64 | 20 51 75 69 63 6b 44 72 |its, and| QuickDr|
|00004ef0| 61 77 20 63 6f 6c 6f 72 | 69 7a 69 6e 67 2e 0d 50 |aw color|izing..P|
|00004f00| 52 4f 43 45 44 55 52 45 | 20 50 61 69 6e 74 42 75 |ROCEDURE| PaintBu|
|00004f10| 63 6b 65 74 28 77 68 65 | 72 65 3a 20 50 6f 69 6e |cket(whe|re: Poin|
|00004f20| 74 3b 20 70 61 69 6e 74 | 43 6f 6c 6f 72 3a 20 52 |t; paint|Color: R|
|00004f30| 47 42 43 6f 6c 6f 72 29 | 3b 0d 09 56 41 52 0d 09 |GBColor)|;..VAR..|
|00004f40| 09 73 61 76 65 64 46 47 | 09 3a 20 52 47 42 43 6f |.savedFG|.: RGBCo|
|00004f50| 6c 6f 72 3b 0d 09 09 6f | 66 66 42 69 74 73 09 3a |lor;...o|ffBits.:|
|00004f60| 20 42 69 74 4d 61 70 3b | 0d 09 42 45 47 49 4e 0d | BitMap;|..BEGIN.|
|00004f70| 09 09 7b 46 69 72 73 74 | 2c 20 63 72 65 61 74 65 |..{First|, create|
|00004f80| 20 61 6e 20 6f 66 66 73 | 63 72 65 65 6e 20 62 69 | an offs|creen bi|
|00004f90| 74 6d 61 70 2e 7d 0d 09 | 09 6f 66 66 42 69 74 73 |tmap.}..|.offBits|
|00004fa0| 2e 62 6f 75 6e 64 73 20 | 3a 3d 20 6d 79 57 69 6e |.bounds |:= myWin|
|00004fb0| 64 6f 77 5e 2e 70 6f 72 | 74 52 65 63 74 3b 0d 09 |dow^.por|tRect;..|
|00004fc0| 09 57 49 54 48 20 6f 66 | 66 42 69 74 73 2e 62 6f |.WITH of|fBits.bo|
|00004fd0| 75 6e 64 73 20 44 4f 20 | 42 45 47 49 4e 0d 09 09 |unds DO |BEGIN...|
|00004fe0| 09 6f 66 66 42 69 74 73 | 2e 72 6f 77 42 79 74 65 |.offBits|.rowByte|
|00004ff0| 73 20 3a 3d 20 28 28 72 | 69 67 68 74 20 2d 20 6c |s := ((r|ight - l|
|00005000| 65 66 74 20 2b 20 31 35 | 29 20 44 49 56 20 31 36 |eft + 15|) DIV 16|
|00005010| 29 20 2a 20 32 3b 0d 09 | 09 09 6f 66 66 42 69 74 |) * 2;..|..offBit|
|00005020| 73 2e 62 61 73 65 41 64 | 64 72 20 3a 3d 20 4e 65 |s.baseAd|dr := Ne|
|00005030| 77 50 74 72 28 28 62 6f | 74 74 6f 6d 2d 74 6f 70 |wPtr((bo|ttom-top|
|00005040| 29 20 2a 20 6f 66 66 42 | 69 74 73 2e 72 6f 77 42 |) * offB|its.rowB|
|00005050| 79 74 65 73 29 3b 0d 09 | 09 45 4e 44 3b 0d 09 09 |ytes);..|.END;...|
|00005060| 7b 43 68 65 63 6b 20 4d | 65 6d 45 72 72 6f 72 20 |{Check M|emError |
|00005070| 68 65 72 65 21 20 4d 61 | 6b 65 20 73 75 72 65 20 |here! Ma|ke sure |
|00005080| 4e 65 77 50 74 72 20 73 | 75 63 63 65 65 64 65 64 |NewPtr s|ucceeded|
|00005090| 21 7d 0d 09 09 53 65 65 | 64 43 46 69 6c 6c 28 6d |!}...See|dCFill(m|
|000050a0| 79 57 69 6e 64 6f 77 5e | 2e 70 6f 72 74 42 69 74 |yWindow^|.portBit|
|000050b0| 73 2c 6f 66 66 42 69 74 | 73 2c 6d 79 57 69 6e 64 |s,offBit|s,myWind|
|000050c0| 6f 77 5e 2e 70 6f 72 74 | 52 65 63 74 2c 0d 09 09 |ow^.port|Rect,...|
|000050d0| 09 6d 79 57 69 6e 64 6f | 77 5e 2e 70 6f 72 74 52 |.myWindo|w^.portR|
|000050e0| 65 63 74 2c 77 68 65 72 | 65 2e 68 2c 77 68 65 72 |ect,wher|e.h,wher|
|000050f0| 65 2e 76 2c 4e 49 4c 2c | 30 29 3b 0d 09 09 47 65 |e.v,NIL,|0);...Ge|
|00005100| 74 46 6f 72 65 43 6f 6c | 6f 72 28 73 61 76 65 64 |tForeCol|or(saved|
|00005110| 46 47 29 3b 0d 09 09 52 | 47 42 46 6f 72 65 43 6f |FG);...R|GBForeCo|
|00005120| 6c 6f 72 28 70 61 69 6e | 74 43 6f 6c 6f 72 29 3b |lor(pain|tColor);|
|00005130| 0d 09 09 43 6f 70 79 4d | 61 73 6b 28 6f 66 66 42 |...CopyM|ask(offB|
|00005140| 69 74 73 2c 6f 66 66 42 | 69 74 73 2c 6d 79 57 69 |its,offB|its,myWi|
|00005150| 6e 64 6f 77 5e 2e 70 6f | 72 74 42 69 74 73 2c 6d |ndow^.po|rtBits,m|
|00005160| 79 57 69 6e 64 6f 77 5e | 2e 70 6f 72 74 52 65 63 |yWindow^|.portRec|
|00005170| 74 2c 0d 09 09 09 6d 79 | 57 69 6e 64 6f 77 5e 2e |t,....my|Window^.|
|00005180| 70 6f 72 74 52 65 63 74 | 2c 6d 79 57 69 6e 64 6f |portRect|,myWindo|
|00005190| 77 5e 2e 70 6f 72 74 52 | 65 63 74 29 3b 0d 09 09 |w^.portR|ect);...|
|000051a0| 52 47 42 46 6f 72 65 43 | 6f 6c 6f 72 28 73 61 76 |RGBForeC|olor(sav|
|000051b0| 65 64 46 47 29 3b 0d 09 | 09 44 69 73 70 6f 73 50 |edFG);..|.DisposP|
|000051c0| 74 72 28 6f 66 66 42 69 | 74 73 2e 42 61 73 65 41 |tr(offBi|ts.BaseA|
|000051d0| 64 64 72 29 3b 0d 09 45 | 4e 44 3b 0d 54 68 65 20 |ddr);..E|ND;.The |
|000051e0| 76 61 72 69 61 62 6c 65 | 20 6f 66 66 42 69 74 73 |variable| offBits|
|000051f0| 20 69 73 20 61 6e 20 6f | 66 66 73 63 72 65 65 6e | is an o|ffscreen|
|00005200| 20 42 69 74 4d 61 70 20 | 28 6e 6f 74 20 61 20 50 | BitMap |(not a P|
|00005210| 69 78 4d 61 70 29 20 77 | 69 74 68 20 62 6f 75 6e |ixMap) w|ith boun|
|00005220| 64 73 20 3d 20 6d 79 57 | 69 6e 64 6f 77 5e 2e 70 |ds = myW|indow^.p|
|00005230| 6f 72 74 52 65 63 74 2e | 20 20 53 65 65 64 43 46 |ortRect.| SeedCF|
|00005240| 69 6c 6c 20 65 66 66 65 | 63 74 69 76 65 6c 79 20 |ill effe|ctively |
|00005250| 63 72 65 61 74 65 73 2c | 20 69 6e 20 74 68 65 20 |creates,| in the |
|00005260| 6f 66 66 73 63 72 65 65 | 6e 20 42 69 74 4d 61 70 |offscree|n BitMap|
|00005270| 2c 20 20 61 20 6d 6f 6e | 6f 63 68 72 6f 6d 65 20 |, a mon|ochrome |
|00005280| 69 6d 61 67 65 20 6f 66 | 20 74 68 65 20 62 69 74 |image of| the bit|
|00005290| 73 20 74 68 61 74 20 77 | 65 20 77 61 6e 74 20 74 |s that w|e want t|
|000052a0| 6f 20 70 61 69 6e 74 2e | 20 53 69 6e 63 65 20 6f |o paint.| Since o|
|000052b0| 66 66 42 69 74 73 20 63 | 6f 6e 74 61 69 6e 73 20 |ffBits c|ontains |
|000052c0| 74 68 65 20 65 78 61 63 | 74 20 62 69 74 73 20 74 |the exac|t bits t|
|000052d0| 68 61 74 20 77 65 20 77 | 61 6e 74 20 74 6f 20 70 |hat we w|ant to p|
|000052e0| 61 69 6e 74 2c 20 69 74 | 20 69 73 20 75 73 65 64 |aint, it| is used|
|000052f0| 20 61 73 20 62 6f 74 68 | 20 74 68 65 20 73 6f 75 | as both| the sou|
|00005300| 72 63 65 20 69 6d 61 67 | 65 20 61 6e 64 20 74 68 |rce imag|e and th|
|00005310| 65 20 6d 61 73 6b 20 66 | 6f 72 20 43 6f 70 79 4d |e mask f|or CopyM|
|00005320| 61 73 6b 2e 0d 42 79 20 | 73 65 74 74 69 6e 67 20 |ask..By |setting |
|00005330| 74 68 65 20 66 6f 72 65 | 67 72 6f 75 6e 64 20 63 |the fore|ground c|
|00005340| 6f 6c 6f 72 20 74 6f 20 | 74 68 65 20 64 65 73 69 |olor to |the desi|
|00005350| 72 65 64 20 70 61 69 6e | 74 20 63 6f 6c 6f 72 2c |red pain|t color,|
|00005360| 20 74 68 65 20 72 65 73 | 75 6c 74 20 69 73 20 61 | the res|ult is a|
|00005370| 20 63 6f 6c 6f 72 69 7a | 65 64 20 76 65 72 73 69 | coloriz|ed versi|
|00005380| 6f 6e 20 6f 66 20 74 68 | 65 20 6d 61 73 6b 20 28 |on of th|e mask (|
|00005390| 74 68 65 20 70 61 69 6e | 74 20 61 72 65 61 29 20 |the pain|t area) |
|000053a0| 62 65 69 6e 67 20 63 6f | 70 69 65 64 20 6f 6e 74 |being co|pied ont|
|000053b0| 6f 20 74 68 65 20 77 69 | 6e 64 6f 77 d5 73 20 50 |o the wi|ndow.s P|
|000053c0| 69 78 4d 61 70 20 77 69 | 74 68 6f 75 74 20 61 66 |ixMap wi|thout af|
|000053d0| 66 65 63 74 69 6e 67 20 | 61 6e 79 20 6f 74 68 65 |fecting |any othe|
|000053e0| 72 20 62 69 74 73 2e 0d | 46 75 72 74 68 65 72 20 |r bits..|Further |
|000053f0| 52 65 66 65 72 65 6e 63 | 65 3a 0d a5 09 43 6f 6c |Referenc|e:...Col|
|00005400| 6f 72 20 51 75 69 63 6b | 44 72 61 77 0d 51 44 20 |or Quick|Draw.QD |
|00005410| 35 20 2d 20 44 69 73 70 | 6c 61 79 69 6e 67 20 4c |5 - Disp|laying L|
|00005420| 61 72 67 65 20 50 49 43 | 54 20 46 69 6c 65 73 0d |arge PIC|T Files.|
|00005430| 51 75 69 63 6b 44 72 61 | 77 09 0d 52 65 76 69 73 |QuickDra|w..Revis|
|00005440| 65 64 20 62 79 3a 09 09 | 4d 61 72 63 68 20 31 39 |ed by:..|March 19|
|00005450| 38 38 0d 57 72 69 74 74 | 65 6e 20 62 79 3a 09 52 |88.Writt|en by:.R|
|00005460| 69 63 6b 20 42 6c 61 69 | 72 20 09 4a 75 6c 79 20 |ick Blai|r .July |
|00005470| 31 39 38 37 0d 4e 6f 77 | 20 74 68 61 74 20 77 65 |1987.Now| that we|
|00005480| 20 68 61 76 65 20 73 63 | 61 6e 6e 65 72 73 20 61 | have sc|anners a|
|00005490| 6e 64 20 6f 74 68 65 72 | 20 6d 61 73 73 69 76 65 |nd other| massive|
|000054a0| 2d 70 69 63 74 75 72 65 | 20 70 72 6f 64 75 63 69 |-picture| produci|
|000054b0| 6e 67 20 74 79 70 65 73 | 20 6f 66 20 61 70 70 6c |ng types| of appl|
|000054c0| 69 63 61 74 69 6f 6e 73 | 2c 20 74 68 65 72 65 20 |ications|, there |
|000054d0| 69 73 20 61 20 6e 65 65 | 64 20 74 6f 20 61 64 64 |is a nee|d to add|
|000054e0| 72 65 73 73 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |ress the| problem|
|000054f0| 20 6f 66 20 68 6f 77 20 | 74 6f 20 64 69 73 70 6c | of how |to displ|
|00005500| 61 79 20 61 20 50 49 43 | 54 20 66 6f 72 6d 61 74 |ay a PIC|T format|
|00005510| 20 6f 62 6a 65 63 74 20 | 74 68 61 74 20 69 73 20 | object |that is |
|00005520| 62 69 67 67 65 72 20 74 | 68 61 6e 20 61 20 63 75 |bigger t|han a cu|
|00005530| 72 72 65 6e 74 20 50 49 | 43 54 20 72 65 73 6f 75 |rrent PI|CT resou|
|00005540| 72 63 65 20 69 73 20 61 | 6c 6c 6f 77 65 64 20 74 |rce is a|llowed t|
|00005550| 6f 20 62 65 2e 20 4e 6f | 74 65 20 74 68 61 74 20 |o be. No|te that |
|00005560| 74 68 69 73 20 74 65 63 | 68 6e 69 71 75 65 20 61 |this tec|hnique a|
|00005570| 70 70 6c 69 65 73 20 65 | 71 75 61 6c 6c 79 20 77 |pplies e|qually w|
|00005580| 65 6c 6c 20 74 6f 20 76 | 65 72 73 69 6f 6e 20 31 |ell to v|ersion 1|
|00005590| 20 61 6e 64 20 76 65 72 | 73 69 6f 6e 20 32 20 28 | and ver|sion 2 (|
|000055a0| 77 6f 72 64 2d 6f 70 63 | 6f 64 65 29 20 70 69 63 |word-opc|ode) pic|
|000055b0| 74 75 72 65 73 20 61 73 | 20 70 72 6f 64 75 63 65 |tures as| produce|
|000055c0| 64 20 62 79 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |d by the| Macinto|
|000055d0| 73 68 20 49 49 2e 0d 46 | 75 74 75 72 65 20 43 6f |sh II..F|uture Co|
|000055e0| 6d 70 61 74 69 62 69 6c | 69 74 79 0d 54 68 69 6e |mpatibil|ity.Thin|
|000055f0| 6b 20 6f 66 20 74 68 65 | 20 68 61 6e 64 6c 65 20 |k of the| handle |
|00005600| 72 65 74 75 72 6e 65 64 | 20 62 79 20 61 20 47 65 |returned| by a Ge|
|00005610| 74 52 65 73 6f 75 72 63 | 65 28 27 50 49 43 54 27 |tResourc|e('PICT'|
|00005620| 2c 49 44 29 20 61 73 20 | 61 20 d2 68 61 6e 64 6c |,ID) as |a .handl|
|00005630| 65 d3 20 69 6e 20 74 68 | 65 20 6d 6f 72 65 20 67 |e. in th|e more g|
|00005640| 65 6e 65 72 61 6c 20 73 | 65 6e 73 65 20 6f 66 20 |eneral s|ense of |
|00005650| 62 65 69 6e 67 20 61 6e | 20 61 62 73 74 72 61 63 |being an| abstrac|
|00005660| 74 20 d2 74 61 67 d3 d1 | 73 6f 6d 65 74 68 69 6e |t .tag..|somethin|
|00005670| 67 20 74 68 61 74 20 74 | 68 65 20 52 4f 4d 20 72 |g that t|he ROM r|
|00005680| 6f 75 74 69 6e 65 73 20 | 63 61 6e 20 75 73 65 20 |outines |can use |
|00005690| 74 6f 20 64 72 61 77 20 | 74 68 65 20 70 69 63 74 |to draw |the pict|
|000056a0| 75 72 65 20 77 69 74 68 | 2e 20 44 6f 6e d5 74 20 |ure with|. Don.t |
|000056b0| 61 73 73 75 6d 65 20 74 | 68 61 74 20 74 68 65 20 |assume t|hat the |
|000056c0| 65 6e 74 69 72 65 20 70 | 69 63 74 75 72 65 20 68 |entire p|icture h|
|000056d0| 61 73 20 62 65 65 6e 20 | 72 65 61 64 20 69 6e 74 |as been |read int|
|000056e0| 6f 20 6d 65 6d 6f 72 79 | 20 6f 72 20 74 68 61 74 |o memory| or that|
|000056f0| 20 79 6f 75 20 63 61 6e | 20 64 69 72 65 63 74 6c | you can| directl|
|00005700| 79 20 72 65 61 64 20 61 | 6e 79 20 62 79 74 65 73 |y read a|ny bytes|
|00005710| 20 62 65 79 6f 6e 64 20 | 74 68 65 20 62 61 73 69 | beyond |the basi|
|00005720| 63 20 50 69 63 74 75 72 | 65 20 72 65 63 6f 72 64 |c Pictur|e record|
|00005730| 20 73 74 72 75 63 74 75 | 72 65 20 28 70 69 63 53 | structu|re (picS|
|00005740| 69 7a 65 20 66 6f 6c 6c | 6f 77 65 64 20 62 79 20 |ize foll|owed by |
|00005750| 70 69 63 46 72 61 6d 65 | 29 2e 20 53 6f 6d 65 64 |picFrame|). Somed|
|00005760| 61 79 20 77 65 20 6d 61 | 79 20 70 72 6f 76 69 64 |ay we ma|y provid|
|00005770| 65 20 61 20 6d 65 63 68 | 61 6e 69 73 6d 20 66 6f |e a mech|anism fo|
|00005780| 72 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 74 |r the re|source t|
|00005790| 6f 20 62 65 20 64 69 73 | 6b 2d 20 69 6e 73 74 65 |o be dis|k- inste|
|000057a0| 61 64 20 6f 66 20 6d 65 | 6d 6f 72 79 2d 62 61 73 |ad of me|mory-bas|
|000057b0| 65 64 2e 20 54 68 65 20 | 51 75 69 63 6b 44 72 61 |ed. The |QuickDra|
|000057c0| 77 20 62 6f 74 74 6c 65 | 6e 65 63 6b 20 70 72 6f |w bottle|neck pro|
|000057d0| 63 65 64 75 72 65 73 20 | 77 69 6c 6c 20 6b 6e 6f |cedures |will kno|
|000057e0| 77 20 68 6f 77 20 74 6f | 20 67 65 74 20 64 61 74 |w how to| get dat|
|000057f0| 61 20 66 72 6f 6d 20 61 | 6e 64 20 70 75 74 20 64 |a from a|nd put d|
|00005800| 61 74 61 20 69 6e 74 6f | 20 74 68 65 20 70 69 63 |ata into| the pic|
|00005810| 74 75 72 65 73 20 69 6e | 20 61 6e 79 20 63 61 73 |tures in| any cas|
|00005820| 65 2e 0d 53 70 6f 6f 6c | 69 6e 67 20 66 72 6f 6d |e..Spool|ing from|
|00005830| 20 61 20 50 49 43 54 20 | 66 69 6c 65 0d 49 6e 20 | a PICT |file.In |
|00005840| 6f 72 64 65 72 20 74 6f | 20 64 69 73 70 6c 61 79 |order to| display|
|00005850| 20 70 69 63 74 75 72 65 | 73 20 6f 66 20 61 72 62 | picture|s of arb|
|00005860| 69 74 72 61 72 79 20 73 | 69 7a 65 2c 20 79 6f 75 |itrary s|ize, you|
|00005870| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 73 68 |r applic|ation sh|
|00005880| 6f 75 6c 64 20 62 65 20 | 61 62 6c 65 20 74 6f 20 |ould be |able to |
|00005890| 69 6d 70 6f 72 74 20 61 | 20 51 75 69 63 6b 44 72 |import a| QuickDr|
|000058a0| 61 77 20 70 69 63 74 75 | 72 65 20 66 72 6f 6d 20 |aw pictu|re from |
|000058b0| 61 20 66 69 6c 65 20 6f | 66 20 74 79 70 65 20 50 |a file o|f type P|
|000058c0| 49 43 54 2e 20 54 68 69 | 73 20 69 73 20 74 68 65 |ICT. Thi|s is the|
|000058d0| 20 66 69 6c 65 20 70 72 | 6f 64 75 63 65 64 20 62 | file pr|oduced b|
|000058e0| 79 20 61 20 d2 53 61 76 | 65 20 61 73 c9 d3 20 66 |y a .Sav|e as.. f|
|000058f0| 72 6f 6d 20 4d 61 63 44 | 72 61 77 20 77 69 74 68 |rom MacD|raw with|
|00005900| 20 74 68 65 20 50 49 43 | 54 20 6f 70 74 69 6f 6e | the PIC|T option|
|00005910| 20 73 65 6c 65 63 74 65 | 64 2e 0d 57 68 61 74 20 | selecte|d..What |
|00005920| 66 6f 6c 6c 6f 77 73 20 | 69 73 20 61 20 73 6d 61 |follows |is a sma|
|00005930| 6c 6c 20 70 72 6f 67 72 | 61 6d 20 66 72 61 67 6d |ll progr|am fragm|
|00005940| 65 6e 74 20 74 68 61 74 | 20 64 65 6d 6f 6e 73 74 |ent that| demonst|
|00005950| 72 61 74 65 73 20 68 6f | 77 20 74 6f 20 73 70 6f |rates ho|w to spo|
|00005960| 6f 6c 20 69 6e 20 61 20 | 70 69 63 74 75 72 65 20 |ol in a |picture |
|00005970| 66 72 6f 6d 20 5b 74 68 | 65 20 64 61 74 61 20 66 |from [th|e data f|
|00005980| 6f 72 6b 20 6f 66 5d 20 | 61 20 50 49 43 54 20 66 |ork of] |a PICT f|
|00005990| 69 6c 65 2e 20 54 68 65 | 20 70 69 63 74 75 72 65 |ile. The| picture|
|000059a0| 20 63 61 6e 20 62 65 20 | 6c 61 72 67 65 72 20 74 | can be |larger t|
|000059b0| 68 61 6e 20 74 68 65 20 | 68 69 73 74 6f 72 69 63 |han the |historic|
|000059c0| 61 6c 20 33 32 4b 20 72 | 65 73 6f 75 72 63 65 20 |al 32K r|esource |
|000059d0| 73 69 7a 65 2e 20 53 65 | 65 20 74 65 63 68 6e 69 |size. Se|e techni|
|000059e0| 63 61 6c 20 6e 6f 74 65 | 20 23 38 38 20 69 66 20 |cal note| #88 if |
|000059f0| 79 6f 75 20 61 72 65 20 | 75 6e 66 61 6d 69 6c 69 |you are |unfamili|
|00005a00| 61 72 20 77 69 74 68 20 | 74 68 65 20 53 69 67 6e |ar with |the Sign|
|00005a10| 61 6c 20 6d 65 63 68 61 | 6e 69 73 6d 2e 20 57 65 |al mecha|nism. We|
|00005a20| 20 61 73 73 75 6d 65 20 | 74 68 61 74 20 61 20 43 | assume |that a C|
|00005a30| 61 74 63 68 53 69 67 6e | 61 6c 73 20 68 61 73 20 |atchSign|als has |
|00005a40| 62 65 65 6e 20 64 6f 6e | 65 20 62 65 66 6f 72 65 |been don|e before|
|00005a50| 20 47 65 74 61 6e 64 44 | 72 61 77 50 49 43 54 46 | GetandD|rawPICTF|
|00005a60| 69 6c 65 20 69 73 20 63 | 61 6c 6c 65 64 2e 0d 4d |ile is c|alled..M|
|00005a70| 50 57 20 50 61 73 63 61 | 6c 20 45 78 61 6d 70 6c |PW Pasca|l Exampl|
|00005a80| 65 0d 09 7b 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |e..{the |followin|
|00005a90| 67 20 76 61 72 69 61 62 | 6c 65 20 6d 75 73 74 20 |g variab|le must |
|00005aa0| 62 65 20 61 74 20 74 68 | 65 20 74 6f 70 20 6c 65 |be at th|e top le|
|00005ab0| 76 65 6c 7d 0d 09 56 41 | 52 0d 09 20 20 20 67 6c |vel}..VA|R.. gl|
|00005ac0| 6f 62 61 6c 52 65 66 20 | 20 20 3a 20 49 4e 54 45 |obalRef | : INTE|
|00005ad0| 47 45 52 3b 20 20 20 20 | 20 20 7b 72 65 66 4e 75 |GER; | {refNu|
|00005ae0| 6d 20 6f 66 20 74 68 65 | 20 66 69 6c 65 20 74 6f |m of the| file to|
|00005af0| 20 72 65 61 64 20 66 72 | 6f 6d 7d 0d 09 7b 74 68 | read fr|om}..{th|
|00005b00| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 70 72 6f 63 |e follow|ing proc|
|00005b10| 65 64 75 72 65 20 6d 75 | 73 74 20 62 65 20 61 74 |edure mu|st be at|
|00005b20| 20 74 68 65 20 74 6f 70 | 20 6c 65 76 65 6c 7d 0d | the top| level}.|
|00005b30| 09 50 52 4f 43 45 44 55 | 52 45 20 47 65 74 50 49 |.PROCEDU|RE GetPI|
|00005b40| 43 54 44 61 74 61 28 64 | 61 74 61 50 74 72 3a 20 |CTData(d|ataPtr: |
|00005b50| 50 74 72 3b 20 62 79 74 | 65 43 6f 75 6e 74 3a 20 |Ptr; byt|eCount: |
|00005b60| 49 4e 54 45 47 45 52 29 | 3b 0d 09 7b 72 65 70 6c |INTEGER)|;..{repl|
|00005b70| 61 63 65 6d 65 6e 74 20 | 66 6f 72 20 74 68 65 20 |acement |for the |
|00005b80| 51 75 69 63 6b 44 72 61 | 77 20 62 6f 74 74 6c 65 |QuickDra|w bottle|
|00005b90| 6e 65 63 6b 20 72 6f 75 | 74 69 6e 65 7d 0d 09 20 |neck rou|tine}.. |
|00005ba0| 20 20 56 41 52 0d 09 20 | 20 20 20 20 20 65 72 72 | VAR.. | err|
|00005bb0| 20 20 20 20 20 20 20 20 | 20 3a 20 4f 53 45 72 72 | | : OSErr|
|00005bc0| 3b 0d 09 20 20 20 20 20 | 20 6c 6f 6e 67 43 6f 75 |;.. | longCou|
|00005bd0| 6e 74 20 20 20 3a 20 4c | 4f 4e 47 49 4e 54 3b 0d |nt : L|ONGINT;.|
|00005be0| 09 20 20 20 42 45 47 49 | 4e 0d 09 20 20 20 20 20 |. BEGI|N.. |
|00005bf0| 20 6c 6f 6e 67 43 6f 75 | 6e 74 20 3a 3d 20 62 79 | longCou|nt := by|
|00005c00| 74 65 43 6f 75 6e 74 3b | 0d 09 20 20 20 20 20 20 |teCount;|.. |
|00005c10| 65 72 72 20 3a 3d 20 46 | 53 52 65 61 64 28 67 6c |err := F|SRead(gl|
|00005c20| 6f 62 61 6c 52 65 66 2c | 6c 6f 6e 67 43 6f 75 6e |obalRef,|longCoun|
|00005c30| 74 2c 64 61 74 61 50 74 | 72 29 3b 0d 09 20 20 20 |t,dataPt|r);.. |
|00005c40| 20 20 20 7b 63 61 6e 27 | 74 20 63 68 65 63 6b 20 | {can'|t check |
|00005c50| 66 6f 72 20 61 6e 20 65 | 72 72 6f 72 20 62 65 63 |for an e|rror bec|
|00005c60| 61 75 73 65 20 77 65 20 | 64 6f 6e 27 74 20 6b 6e |ause we |don't kn|
|00005c70| 6f 77 20 68 6f 77 20 74 | 6f 20 68 61 6e 64 6c 65 |ow how t|o handle|
|00005c80| 20 69 74 7d 0d 09 20 20 | 20 45 4e 44 3b 0d 09 43 | it}.. | END;..C|
|00005c90| 4f 4e 53 54 0d 09 20 20 | 20 61 62 6f 72 74 50 49 |ONST.. | abortPI|
|00005ca0| 43 54 20 20 20 20 3d 20 | 31 32 38 3b 20 20 20 20 |CT = |128; |
|00005cb0| 20 20 20 20 20 7b 65 72 | 72 6f 72 20 63 6f 64 65 | {er|ror code|
|00005cc0| 20 69 66 20 44 72 61 77 | 50 69 63 74 75 72 65 20 | if Draw|Picture |
|00005cd0| 61 62 6f 72 74 65 64 7d | 0d 09 50 52 4f 43 45 44 |aborted}|..PROCED|
|00005ce0| 55 52 45 20 47 65 74 44 | 72 61 77 50 49 43 54 46 |URE GetD|rawPICTF|
|00005cf0| 69 6c 65 3b 20 20 20 20 | 20 7b 72 65 61 64 20 69 |ile; | {read i|
|00005d00| 6e 20 61 20 50 49 43 54 | 20 46 49 4c 45 20 73 65 |n a PICT| FILE se|
|00005d10| 6c 65 63 74 65 64 20 62 | 79 20 74 68 65 20 75 73 |lected b|y the us|
|00005d20| 65 72 7d 0d 09 20 20 20 | 56 41 52 0d 09 20 20 20 |er}.. |VAR.. |
|00005d30| 20 20 20 77 68 65 72 20 | 20 20 20 20 20 20 20 3a | wher | :|
|00005d40| 20 50 6f 69 6e 74 3b 20 | 20 20 20 20 7b 77 68 65 | Point; | {whe|
|00005d50| 72 65 20 74 6f 20 64 69 | 73 70 6c 61 79 20 64 69 |re to di|splay di|
|00005d60| 61 6c 6f 67 7d 0d 09 20 | 20 20 20 20 20 72 65 70 |alog}.. | rep|
|00005d70| 6c 79 20 20 20 20 20 20 | 20 3a 20 53 46 52 65 70 |ly | : SFRep|
|00005d80| 6c 79 3b 20 20 20 7b 72 | 65 70 6c 79 20 72 65 63 |ly; {r|eply rec|
|00005d90| 6f 72 64 7d 0d 09 20 20 | 20 20 20 20 6d 79 46 69 |ord}.. | myFi|
|00005da0| 6c 65 54 79 70 65 73 20 | 3a 20 53 46 54 79 70 65 |leTypes |: SFType|
|00005db0| 4c 69 73 74 3b 20 7b 6d | 6f 72 65 20 53 74 61 6e |List; {m|ore Stan|
|00005dc0| 64 61 72 64 20 46 49 4c | 45 20 67 6f 6f 64 69 65 |dard FIL|E goodie|
|00005dd0| 73 7d 0d 09 20 20 20 20 | 20 20 6e 75 6d 46 69 6c |s}.. | numFil|
|00005de0| 65 54 79 70 65 73 3a 20 | 49 4e 54 45 47 45 52 3b |eTypes: |INTEGER;|
|00005df0| 0d 09 20 20 20 20 20 20 | 73 61 76 65 64 50 72 6f |.. |savedPro|
|00005e00| 63 73 20 20 3a 20 51 44 | 50 72 6f 63 73 50 74 72 |cs : QD|ProcsPtr|
|00005e10| 3b 0d 09 20 20 20 20 20 | 20 6d 79 50 72 6f 63 73 |;.. | myProcs|
|00005e20| 20 20 20 20 20 3a 20 51 | 44 50 72 6f 63 73 3b 20 | : Q|DProcs; |
|00005e30| 20 20 7b 75 73 65 20 43 | 51 44 50 72 6f 63 73 20 | {use C|QDProcs |
|00005e40| 66 6f 72 20 61 20 63 6f | 6c 6f 72 20 77 69 6e 64 |for a co|lor wind|
|00005e50| 6f 77 7d 0d 09 20 20 20 | 20 20 20 6d 79 50 69 63 |ow}.. | myPic|
|00005e60| 74 75 72 65 20 20 20 3a | 20 50 69 63 48 61 6e 64 |ture :| PicHand|
|00005e70| 6c 65 3b 20 7b 77 65 20 | 6e 65 65 64 20 61 20 70 |le; {we |need a p|
|00005e80| 69 63 74 75 72 65 20 68 | 61 6e 64 6c 65 20 66 6f |icture h|andle fo|
|00005e90| 72 20 44 72 61 77 50 69 | 63 74 75 72 65 7d 0d 09 |r DrawPi|cture}..|
|00005ea0| 20 20 20 20 20 20 6c 6f | 6e 67 43 6f 75 6e 74 20 | lo|ngCount |
|00005eb0| 20 20 3a 20 4c 4f 4e 47 | 49 4e 54 3b 0d 09 20 20 | : LONG|INT;.. |
|00005ec0| 20 20 20 20 6d 79 45 4f | 46 20 20 20 20 20 20 20 | myEO|F |
|00005ed0| 3a 20 4c 4f 4e 47 49 4e | 54 3b 0d 09 20 20 20 20 |: LONGIN|T;.. |
|00005ee0| 20 20 6d 79 46 69 6c 65 | 50 6f 73 20 20 20 3a 20 | myFile|Pos : |
|00005ef0| 4c 4f 4e 47 49 4e 54 3b | 0d 09 20 20 20 42 45 47 |LONGINT;|.. BEG|
|00005f00| 49 4e 0d 09 20 20 20 20 | 20 20 77 68 65 72 2e 68 |IN.. | wher.h|
|00005f10| 20 3a 3d 20 32 30 3b 0d | 09 20 20 20 20 20 20 77 | := 20;.|. w|
|00005f20| 68 65 72 2e 76 20 3a 3d | 20 32 30 3b 0d 09 20 20 |her.v :=| 20;.. |
|00005f30| 20 20 20 20 6e 75 6d 46 | 69 6c 65 54 79 70 65 73 | numF|ileTypes|
|00005f40| 20 3a 3d 20 31 3b 20 20 | 20 20 20 20 20 7b 64 69 | := 1; | {di|
|00005f50| 73 70 6c 61 79 20 50 49 | 43 54 20 66 69 6c 65 73 |splay PI|CT files|
|00005f60| 7d 0d 09 20 20 20 20 20 | 20 6d 79 46 69 6c 65 54 |}.. | myFileT|
|00005f70| 79 70 65 73 5b 30 5d 20 | 3a 3d 20 27 50 49 43 54 |ypes[0] |:= 'PICT|
|00005f80| 27 3b 0d 09 20 20 20 20 | 20 20 53 46 47 65 74 46 |';.. | SFGetF|
|00005f90| 69 6c 65 28 77 68 65 72 | 2c 27 27 2c 4e 49 4c 2c |ile(wher|,'',NIL,|
|00005fa0| 6e 75 6d 46 69 6c 65 54 | 79 70 65 73 2c 6d 79 46 |numFileT|ypes,myF|
|00005fb0| 69 6c 65 54 79 70 65 73 | 2c 4e 49 4c 2c 72 65 70 |ileTypes|,NIL,rep|
|00005fc0| 6c 79 29 3b 0d 09 20 20 | 20 20 20 20 49 46 20 72 |ly);.. | IF r|
|00005fd0| 65 70 6c 79 2e 67 6f 6f | 64 20 54 48 45 4e 20 42 |eply.goo|d THEN B|
|00005fe0| 45 47 49 4e 0d 09 20 20 | 20 20 20 20 20 20 20 53 |EGIN.. | S|
|00005ff0| 65 74 53 74 64 50 72 6f | 63 73 28 6d 79 50 72 6f |etStdPro|cs(myPro|
|00006000| 63 73 29 3b 20 7b 75 73 | 65 20 53 65 74 53 74 64 |cs); {us|e SetStd|
|00006010| 43 50 72 6f 63 73 20 66 | 6f 72 20 61 20 43 47 72 |CProcs f|or a CGr|
|00006020| 61 66 50 6f 72 74 7d 0d | 09 20 20 20 20 20 20 20 |afPort}.|. |
|00006030| 20 20 6d 79 50 72 6f 63 | 73 2e 67 65 74 50 69 63 | myProc|s.getPic|
|00006040| 50 72 6f 63 20 3a 3d 20 | 40 47 65 74 50 49 43 54 |Proc := |@GetPICT|
|00006050| 44 61 74 61 3b 0d 09 20 | 20 20 20 20 20 20 20 20 |Data;.. | |
|00006060| 73 61 76 65 64 50 72 6f | 63 73 20 3a 3d 20 74 68 |savedPro|cs := th|
|00006070| 65 50 6f 72 74 5e 2e 67 | 72 61 66 50 72 6f 63 73 |ePort^.g|rafProcs|
|00006080| 3b 20 7b 73 65 74 20 74 | 68 65 20 67 72 61 66 50 |; {set t|he grafP|
|00006090| 72 6f 63 73 20 74 6f 20 | 6f 75 72 73 7d 0d 09 20 |rocs to |ours}.. |
|000060a0| 20 20 20 20 20 20 20 20 | 74 68 65 50 6f 72 74 5e | |thePort^|
|000060b0| 2e 67 72 61 66 50 72 6f | 63 73 20 3a 3d 20 40 6d |.grafPro|cs := @m|
|000060c0| 79 50 72 6f 63 73 3b 0d | 09 20 20 20 20 20 20 20 |yProcs;.|. |
|000060d0| 20 20 6d 79 50 69 63 74 | 75 72 65 20 3a 3d 20 50 | myPict|ure := P|
|000060e0| 69 63 48 61 6e 64 6c 65 | 28 4e 65 77 48 61 6e 64 |icHandle|(NewHand|
|000060f0| 6c 65 28 53 69 7a 65 4f | 66 28 6d 79 50 69 63 74 |le(SizeO|f(myPict|
|00006100| 75 72 65 29 29 29 3b 0d | 09 20 20 20 20 20 20 20 |ure)));.|. |
|00006110| 20 20 53 69 67 6e 61 6c | 28 46 53 4f 70 65 6e 28 | Signal|(FSOpen(|
|00006120| 72 65 70 6c 79 2e 66 6e | 61 6d 65 2c 72 65 70 6c |reply.fn|ame,repl|
|00006130| 79 2e 76 52 65 66 4e 75 | 6d 2c 67 6c 6f 62 61 6c |y.vRefNu|m,global|
|00006140| 52 65 66 29 29 3b 0d 09 | 20 20 20 20 20 20 20 20 |Ref));..| |
|00006150| 20 53 69 67 6e 61 6c 28 | 47 65 74 45 4f 46 28 67 | Signal(|GetEOF(g|
|00006160| 6c 6f 62 61 6c 52 65 66 | 2c 6d 79 45 4f 46 29 29 |lobalRef|,myEOF))|
|00006170| 3b 20 7b 67 65 74 20 45 | 4f 46 20 66 6f 72 20 6c |; {get E|OF for l|
|00006180| 61 74 65 72 20 63 68 65 | 63 6b 7d 0d 09 20 20 20 |ater che|ck}.. |
|00006190| 20 20 20 20 20 20 53 69 | 67 6e 61 6c 28 53 65 74 | Si|gnal(Set|
|000061a0| 46 50 6f 73 28 67 6c 6f | 62 61 6c 52 65 66 2c 66 |FPos(glo|balRef,f|
|000061b0| 73 46 72 6f 6d 53 74 61 | 72 74 2c 35 31 32 29 29 |sFromSta|rt,512))|
|000061c0| 3b 20 7b 73 6b 69 70 20 | 68 65 61 64 65 72 7d 0d |; {skip |header}.|
|000061d0| 09 20 20 20 20 20 20 20 | 20 20 7b 72 65 61 64 20 |. | {read |
|000061e0| 69 6e 20 74 68 65 20 28 | 6f 62 73 6f 6c 65 74 65 |in the (|obsolete|
|000061f0| 29 20 73 69 7a 65 20 77 | 6f 72 64 20 61 6e 64 20 |) size w|ord and |
|00006200| 74 68 65 20 70 69 63 46 | 72 61 6d 65 7d 0d 09 20 |the picF|rame}.. |
|00006210| 20 20 20 20 20 20 20 20 | 6c 6f 6e 67 43 6f 75 6e | |longCoun|
|00006220| 74 20 3a 3d 20 53 69 7a | 65 4f 66 28 6d 79 50 69 |t := Siz|eOf(myPi|
|00006230| 63 74 75 72 65 29 3b 0d | 09 20 20 20 20 20 20 20 |cture);.|. |
|00006240| 20 20 53 69 67 6e 61 6c | 28 46 53 52 65 61 64 28 | Signal|(FSRead(|
|00006250| 67 6c 6f 62 61 6c 52 65 | 66 2c 6c 6f 6e 67 43 6f |globalRe|f,longCo|
|00006260| 75 6e 74 2c 50 74 72 28 | 6d 79 50 69 63 74 75 72 |unt,Ptr(|myPictur|
|00006270| 65 5e 29 29 29 3b 0d 09 | 20 20 20 20 20 20 20 20 |e^)));..| |
|00006280| 20 44 72 61 77 50 69 63 | 74 75 72 65 28 6d 79 50 | DrawPic|ture(myP|
|00006290| 69 63 74 75 72 65 2c 6d | 79 50 69 63 74 75 72 65 |icture,m|yPicture|
|000062a0| 5e 5e 2e 70 69 63 46 72 | 61 6d 65 29 3b 20 7b 64 |^^.picFr|ame); {d|
|000062b0| 72 61 77 20 74 68 65 20 | 70 69 63 74 75 72 65 7d |raw the |picture}|
|000062c0| 0d 09 20 20 20 20 20 20 | 20 20 20 53 69 67 6e 61 |.. | Signa|
|000062d0| 6c 28 47 65 74 46 50 6f | 73 28 67 6c 6f 62 61 6c |l(GetFPo|s(global|
|000062e0| 52 65 66 2c 66 69 6c 65 | 50 6f 73 29 29 3b 20 7b |Ref,file|Pos)); {|
|000062f0| 67 65 74 20 70 6f 73 69 | 74 69 6f 6e 20 66 6f 72 |get posi|tion for|
|00006300| 20 63 68 65 63 6b 7d 0d | 09 20 20 20 20 20 20 20 | check}.|. |
|00006310| 20 20 53 69 67 6e 61 6c | 28 46 53 43 6c 6f 73 65 | Signal|(FSClose|
|00006320| 28 67 6c 6f 62 61 6c 52 | 65 66 29 29 3b 0d 09 20 |(globalR|ef));.. |
|00006330| 20 20 20 20 20 20 20 20 | 44 69 73 70 6f 73 48 61 | |DisposHa|
|00006340| 6e 64 6c 65 28 48 61 6e | 64 6c 65 28 6d 79 50 69 |ndle(Han|dle(myPi|
|00006350| 63 74 75 72 65 29 29 3b | 0d 09 20 20 20 20 20 20 |cture));|.. |
|00006360| 20 20 20 74 68 65 50 6f | 72 74 5e 2e 67 72 61 66 | thePo|rt^.graf|
|00006370| 50 72 6f 63 73 20 3a 3d | 20 73 61 76 65 64 50 72 |Procs :=| savedPr|
|00006380| 6f 63 73 3b 20 7b 72 65 | 73 74 6f 72 65 20 74 68 |ocs; {re|store th|
|00006390| 65 20 70 72 6f 63 73 7d | 0d 09 20 20 20 20 20 20 |e procs}|.. |
|000063a0| 20 20 20 7b 43 68 65 63 | 6b 20 66 6f 72 20 65 72 | {Chec|k for er|
|000063b0| 72 6f 72 73 2e 20 49 66 | 20 74 68 65 72 65 20 77 |rors. If| there w|
|000063c0| 61 73 6e 27 74 20 65 6e | 6f 75 67 68 20 72 6f 6f |asn't en|ough roo|
|000063d0| 6d 2c 7d 0d 09 20 20 20 | 20 20 20 20 20 20 7b 44 |m,}.. | {D|
|000063e0| 72 61 77 50 69 63 74 75 | 72 65 20 77 69 6c 6c 20 |rawPictu|re will |
|000063f0| 61 62 6f 72 74 3b 20 74 | 68 65 20 46 49 4c 45 20 |abort; t|he FILE |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.